Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Replace 0 with NULL for pointer variables



details:   https://anonhg.NetBSD.org/src/rev/e70e80b27136
branches:  trunk
changeset: 337703:e70e80b27136
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Apr 24 02:56:51 2015 +0000

description:
Replace 0 with NULL for pointer variables

diffstat:

 sys/netinet/ip_icmp.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r d0e70b4c8f1d -r e70e80b27136 sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c     Fri Apr 24 01:17:32 2015 +0000
+++ b/sys/netinet/ip_icmp.c     Fri Apr 24 02:56:51 2015 +0000
@@ -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 @@
        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 @@
                 * 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 @@
        int    error;
 
        rt = rtalloc1(dst, 1);
-       if (rt == 0)
+       if (rt == NULL)
                return;
 
        /* If we didn't get a host route, allocate one */



Home | Main Index | Thread Index | Old Index