Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet check against NULL



details:   https://anonhg.NetBSD.org/src/rev/984e8f510c60
branches:  trunk
changeset: 772588:984e8f510c60
user:      liamjfoy <liamjfoy%NetBSD.org@localhost>
date:      Mon Jan 09 14:31:21 2012 +0000

description:
check against NULL

diffstat:

 sys/netinet/igmp.c     |  6 +++---
 sys/netinet/in_gif.c   |  6 +++---
 sys/netinet/ip_icmp.c  |  6 +++---
 sys/netinet/ip_input.c |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diffs (108 lines):

diff -r 35ff57d5c34d -r 984e8f510c60 sys/netinet/igmp.c
--- a/sys/netinet/igmp.c        Mon Jan 09 13:51:54 2012 +0000
+++ b/sys/netinet/igmp.c        Mon Jan 09 14:31:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igmp.c,v 1.52 2011/07/17 20:54:53 joerg Exp $  */
+/*     $NetBSD: igmp.c,v 1.53 2012/01/09 14:31:21 liamjfoy Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.52 2011/07/17 20:54:53 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.53 2012/01/09 14:31:21 liamjfoy Exp $");
 
 #include "opt_mrouting.h"
 
@@ -191,7 +191,7 @@
        }
        if (((m->m_flags & M_EXT) && (ip->ip_src.s_addr & IN_CLASSA_NET) == 0)
            || m->m_len < minlen) {
-               if ((m = m_pullup(m, minlen)) == 0) {
+               if ((m = m_pullup(m, minlen)) == NULL) {
                        IGMP_STATINC(IGMP_STAT_RCV_TOOSHORT);
                        return;
                }
diff -r 35ff57d5c34d -r 984e8f510c60 sys/netinet/in_gif.c
--- a/sys/netinet/in_gif.c      Mon Jan 09 13:51:54 2012 +0000
+++ b/sys/netinet/in_gif.c      Mon Jan 09 14:31:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_gif.c,v 1.61 2011/07/17 20:54:53 joerg Exp $        */
+/*     $NetBSD: in_gif.c,v 1.62 2012/01/09 14:31:22 liamjfoy Exp $     */
 /*     $KAME: in_gif.c,v 1.66 2001/07/29 04:46:09 itojun Exp $ */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.61 2011/07/17 20:54:53 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.62 2012/01/09 14:31:22 liamjfoy Exp $");
 
 #include "opt_inet.h"
 #include "opt_iso.h"
@@ -131,7 +131,7 @@
                proto = IPPROTO_IPV6;
                if (m->m_len < sizeof(*ip6)) {
                        m = m_pullup(m, sizeof(*ip6));
-                       if (!m)
+                       if (m == NULL)
                                return ENOBUFS;
                }
                ip6 = mtod(m, const struct ip6_hdr *);
diff -r 35ff57d5c34d -r 984e8f510c60 sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c     Mon Jan 09 13:51:54 2012 +0000
+++ b/sys/netinet/ip_icmp.c     Mon Jan 09 14:31:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_icmp.c,v 1.127 2011/12/31 20:41:58 christos Exp $   */
+/*     $NetBSD: ip_icmp.c,v 1.128 2012/01/09 14:31:22 liamjfoy 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.127 2011/12/31 20:41:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.128 2012/01/09 14:31:22 liamjfoy Exp $");
 
 #include "opt_ipsec.h"
 
@@ -425,7 +425,7 @@
                goto freeit;
        }
        i = hlen + min(icmplen, ICMP_ADVLENMIN);
-       if ((m->m_len < i || M_READONLY(m)) && (m = m_pullup(m, i)) == 0) {
+       if ((m->m_len < i || M_READONLY(m)) && (m = m_pullup(m, i)) == NULL) {
                ICMP_STATINC(ICMP_STAT_TOOSHORT);
                return;
        }
diff -r 35ff57d5c34d -r 984e8f510c60 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Mon Jan 09 13:51:54 2012 +0000
+++ b/sys/netinet/ip_input.c    Mon Jan 09 14:31:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.297 2011/12/19 11:59:56 drochner Exp $  */
+/*     $NetBSD: ip_input.c,v 1.298 2012/01/09 14:31:22 liamjfoy Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.297 2011/12/19 11:59:56 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.298 2012/01/09 14:31:22 liamjfoy Exp $");
 
 #include "opt_inet.h"
 #include "opt_compat_netbsd.h"
@@ -456,7 +456,7 @@
                goto bad;
        }
        if (hlen > m->m_len) {
-               if ((m = m_pullup(m, hlen)) == 0) {
+               if ((m = m_pullup(m, hlen)) == NULL) {
                        IP_STATINC(IP_STAT_BADHLEN);
                        return;
                }



Home | Main Index | Thread Index | Old Index