Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2016 19:09:33 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r299749 - in stable/10: contrib/ipfilter sys/contrib/ipfilter/netinet
Message-ID:  <201605141909.u4EJ9Xdm003557@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sat May 14 19:09:32 2016
New Revision: 299749
URL: https://svnweb.freebsd.org/changeset/base/299749

Log:
  MFC r298030: Use NULL instead of 0 for pointer comparison.

Modified:
  stable/10/contrib/ipfilter/bpf_filter.c
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/ipfilter/bpf_filter.c
==============================================================================
--- stable/10/contrib/ipfilter/bpf_filter.c	Sat May 14 18:47:36 2016	(r299748)
+++ stable/10/contrib/ipfilter/bpf_filter.c	Sat May 14 19:09:32 2016	(r299749)
@@ -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: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c	Sat May 14 18:47:36 2016	(r299748)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c	Sat May 14 19:09:32 2016	(r299749)
@@ -742,7 +742,7 @@ ipf_fastroute(m0, mpp, fin, fdp)
 	*/
 	if (M_WRITABLE(m) == 0) {
 		m0 = m_dup(m, M_DONTWAIT);
-		if (m0 != 0) {
+		if (m0 != NULL) {
 			FREE_MB_T(m);
 			m = m0;
 			*mpp = m;
@@ -893,7 +893,7 @@ ipf_fastroute(m0, mpp, fin, fdp)
 #else
 		MGET(m, M_DONTWAIT, MT_HEADER);
 #endif
-		if (m == 0) {
+		if (m == NULL) {
 			m = m0;
 			error = ENOBUFS;
 			goto bad;



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