From owner-svn-src-all@freebsd.org Fri Apr 15 03:43:18 2016 Return-Path: Delivered-To: svn-src-all@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 3F0FDAED4E5; Fri, 15 Apr 2016 03:43:18 +0000 (UTC) (envelope-from cy@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 0FE1C1CAA; Fri, 15 Apr 2016 03:43:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3F3hHAH059389; Fri, 15 Apr 2016 03:43:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3F3hHSv059387; Fri, 15 Apr 2016 03:43:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201604150343.u3F3hHSv059387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 15 Apr 2016 03:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298030 - in head: contrib/ipfilter sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 03:43:18 -0000 Author: cy Date: Fri Apr 15 03:43:16 2016 New Revision: 298030 URL: https://svnweb.freebsd.org/changeset/base/298030 Log: Use NULL instead of 0 for pointer comparison. MFC after: 4 weeks Modified: head/contrib/ipfilter/bpf_filter.c head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/contrib/ipfilter/bpf_filter.c ============================================================================== --- head/contrib/ipfilter/bpf_filter.c Fri Apr 15 03:42:12 2016 (r298029) +++ head/contrib/ipfilter/bpf_filter.c Fri Apr 15 03:43:16 2016 (r298030) @@ -132,7 +132,7 @@ m_xword(m, k, err) return EXTRACT_LONG(cp); } m0 = m->m_next; - if (m0 == 0 || M_LEN(m0) + len - k < 4) + if (m0 == NULL || M_LEN(m0) + len - k < 4) goto bad; *err = 0; np = MTOD(m0, u_char *); @@ -168,7 +168,7 @@ m_xhalf(m, k, err) return EXTRACT_SHORT(cp); } m0 = m->m_next; - if (m0 == 0) + if (m0 == NULL) goto bad; *err = 0; return (cp[0] << 8) | MTOD(m0, u_char *)[0]; @@ -205,7 +205,7 @@ bpf_filter(pc, p, wirelen, buflen) } else m = NULL; - if (pc == 0) + if (pc == NULL) /* * No filter means accept all. */ Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri Apr 15 03:42:12 2016 (r298029) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri Apr 15 03:43:16 2016 (r298030) @@ -738,7 +738,7 @@ ipf_fastroute(m0, mpp, fin, fdp) */ if (M_WRITABLE(m) == 0) { m0 = m_dup(m, M_NOWAIT); - if (m0 != 0) { + if (m0 != NULL) { FREE_MB_T(m); m = m0; *mpp = m; @@ -885,7 +885,7 @@ ipf_fastroute(m0, mpp, fin, fdp) #else MGET(m, M_NOWAIT, MT_HEADER); #endif - if (m == 0) { + if (m == NULL) { m = m0; error = ENOBUFS; goto bad;