From owner-svn-src-head@freebsd.org Fri Jul 21 03:59:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE1C5D7ED55; Fri, 21 Jul 2017 03:59:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4FE42EEE; Fri, 21 Jul 2017 03:59:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6L3xuWX099048; Fri, 21 Jul 2017 03:59:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6L3xuKt099046; Fri, 21 Jul 2017 03:59:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201707210359.v6L3xuKt099046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Fri, 21 Jul 2017 03:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321321 - head/sys/dev/netmap X-SVN-Group: head X-SVN-Commit-Author: loos X-SVN-Commit-Paths: head/sys/dev/netmap X-SVN-Commit-Revision: 321321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jul 2017 03:59:58 -0000 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; } }