Module Name: src Committed By: ozaki-r Date: Fri Apr 24 02:56:51 UTC 2015
Modified Files: src/sys/netinet: ip_icmp.c Log Message: Replace 0 with NULL for pointer variables To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/netinet/ip_icmp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/ip_icmp.c diff -u src/sys/netinet/ip_icmp.c:1.135 src/sys/netinet/ip_icmp.c:1.136 --- src/sys/netinet/ip_icmp.c:1.135 Tue Dec 2 20:25:47 2014 +++ src/sys/netinet/ip_icmp.c Fri Apr 24 02:56:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_icmp.c,v 1.135 2014/12/02 20:25:47 christos Exp $ */ +/* $NetBSD: ip_icmp.c,v 1.136 2015/04/24 02:56:51 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -94,7 +94,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.135 2014/12/02 20:25:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.136 2015/04/24 02:56:51 ozaki-r Exp $"); #include "opt_ipsec.h" @@ -680,9 +680,9 @@ icmp_reflect(struct mbuf *m) struct ip *ip = mtod(m, struct ip *); struct in_ifaddr *ia; struct ifaddr *ifa; - struct sockaddr_in *sin = 0; + struct sockaddr_in *sin = NULL; struct in_addr t; - struct mbuf *opts = 0; + struct mbuf *opts = NULL; int optlen = (ip->ip_hl << 2) - sizeof(struct ip); if (!in_canforward(ip->ip_src) && @@ -805,7 +805,7 @@ icmp_reflect(struct mbuf *m) * add on any record-route or timestamp options. */ cp = (u_char *) (ip + 1); - if ((opts = ip_srcroute()) == 0 && + if ((opts = ip_srcroute()) == NULL && (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) { MCLAIM(opts, m->m_owner); opts->m_len = sizeof(struct in_addr); @@ -1093,7 +1093,7 @@ icmp_mtudisc(struct icmp *icp, struct in int error; rt = rtalloc1(dst, 1); - if (rt == 0) + if (rt == NULL) return; /* If we didn't get a host route, allocate one */