Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2017 03:59:56 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321321 - head/sys/dev/netmap
Message-ID:  <201707210359.v6L3xuKt099046@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Fri Jul 21 03:59:56 2017
New Revision: 321321
URL: https://svnweb.freebsd.org/changeset/base/321321

Log:
  Restore the changes done in r313982: Replace zero with NULL for pointers.
  
  Spotted by:	Harry Schmalzbauer
  MFC after:	1 week
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/dev/netmap/netmap_freebsd.c
  head/sys/dev/netmap/netmap_mem2.c

Modified: head/sys/dev/netmap/netmap_freebsd.c
==============================================================================
--- head/sys/dev/netmap/netmap_freebsd.c	Fri Jul 21 03:48:09 2017	(r321320)
+++ head/sys/dev/netmap/netmap_freebsd.c	Fri Jul 21 03:59:56 2017	(r321321)
@@ -671,7 +671,7 @@ nm_os_pt_memdev_iomap(struct ptnetmap_memdev *ptn_dev,
 			&rid, 0, ~0, *mem_size, RF_ACTIVE);
 	if (ptn_dev->pci_mem == NULL) {
 		*nm_paddr = 0;
-		*nm_addr = 0;
+		*nm_addr = NULL;
 		return ENOMEM;
 	}
 

Modified: head/sys/dev/netmap/netmap_mem2.c
==============================================================================
--- head/sys/dev/netmap/netmap_mem2.c	Fri Jul 21 03:48:09 2017	(r321320)
+++ head/sys/dev/netmap/netmap_mem2.c	Fri Jul 21 03:59:56 2017	(r321321)
@@ -2146,7 +2146,7 @@ netmap_mem_pt_guest_deref(struct netmap_mem_d *nmd)
 	    if (ptnmd->ptn_dev) {
 		nm_os_pt_memdev_iounmap(ptnmd->ptn_dev);
 	    }
-	    ptnmd->nm_addr = 0;
+	    ptnmd->nm_addr = NULL;
 	    ptnmd->nm_paddr = 0;
 	}
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707210359.v6L3xuKt099046>