summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-01-30 19:29:47 +0000
committerrwatson <rwatson@FreeBSD.org>2005-01-30 19:29:47 +0000
commit7a3d7a3dc990b339d2582ef7e9c0f057f057d794 (patch)
tree0129dd17add97785944eb4770afbef75cd6b98a7 /sys/netinet/ip_input.c
parent060c0cd7474855f366dbdf5888f3a386b26ac0ae (diff)
downloadFreeBSD-src-7a3d7a3dc990b339d2582ef7e9c0f057f057d794.zip
FreeBSD-src-7a3d7a3dc990b339d2582ef7e9c0f057f057d794.tar.gz
Prefer (NULL) spelling of (0) for pointers.
MFC after: 3 days
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 7b2bf87..3021285 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -248,7 +248,7 @@ ip_init()
TAILQ_INIT(&in_ifaddrhead);
in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &in_ifaddrhmask);
pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW);
- if (pr == 0)
+ if (pr == NULL)
panic("ip_init: PF_INET not found");
/* Initialize the entire ip_protox[] array to IPPROTO_RAW. */
@@ -1024,10 +1024,10 @@ inserted:
*/
m = q;
t = m->m_next;
- m->m_next = 0;
+ m->m_next = NULL;
m_cat(m, t);
nq = q->m_nextpkt;
- q->m_nextpkt = 0;
+ q->m_nextpkt = NULL;
for (q = nq; q != NULL; q = nq) {
nq = q->m_nextpkt;
q->m_nextpkt = NULL;
@@ -1521,11 +1521,11 @@ ip_rtaddr(dst)
rtalloc_ign(&sro, RTF_CLONING);
if (sro.ro_rt == NULL)
- return ((struct in_ifaddr *)0);
+ return (NULL);
ifa = ifatoia(sro.ro_rt->rt_ifa);
RTFREE(sro.ro_rt);
- return ifa;
+ return (ifa);
}
/*
@@ -1574,13 +1574,13 @@ ip_srcroute(m0)
opts = (struct ipopt_tag *)m_tag_find(m0, PACKET_TAG_IPOPTIONS, NULL);
if (opts == NULL)
- return ((struct mbuf *)0);
+ return (NULL);
if (opts->ip_nhops == 0)
- return ((struct mbuf *)0);
+ return (NULL);
m = m_get(M_DONTWAIT, MT_HEADER);
if (m == NULL)
- return ((struct mbuf *)0);
+ return (NULL);
#define OPTSIZ (sizeof(opts->ip_srcrt.nop) + sizeof(opts->ip_srcrt.srcopt))
@@ -1815,7 +1815,7 @@ ip_forward(struct mbuf *m, int srcrt)
RTFREE(rt);
}
- error = ip_output(m, (struct mbuf *)0, NULL, IP_FORWARDING, 0, NULL);
+ error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL);
if (error)
ipstat.ips_cantforward++;
else {
OpenPOWER on IntegriCloud