summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/bpf_filter.c
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2016-04-15 03:43:16 +0000
committercy <cy@FreeBSD.org>2016-04-15 03:43:16 +0000
commit804fd2b13b5758963cb6215320a056da3bc182d6 (patch)
tree1837d9914179998bbea5b7250494fa6bee17ebec /contrib/ipfilter/bpf_filter.c
parent784a797eede7e9e2ee3e82efedc1fc47547ca85b (diff)
downloadFreeBSD-src-804fd2b13b5758963cb6215320a056da3bc182d6.zip
FreeBSD-src-804fd2b13b5758963cb6215320a056da3bc182d6.tar.gz
Use NULL instead of 0 for pointer comparison.
MFC after: 4 weeks
Diffstat (limited to 'contrib/ipfilter/bpf_filter.c')
-rw-r--r--contrib/ipfilter/bpf_filter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/ipfilter/bpf_filter.c b/contrib/ipfilter/bpf_filter.c
index d75570e..bd46576 100644
--- a/contrib/ipfilter/bpf_filter.c
+++ b/contrib/ipfilter/bpf_filter.c
@@ -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.
*/
OpenPOWER on IntegriCloud