Module Name: src Committed By: liamjfoy Date: Mon Jan 9 14:31:22 UTC 2012
Modified Files: src/sys/netinet: igmp.c in_gif.c ip_icmp.c ip_input.c Log Message: check against NULL To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/netinet/igmp.c cvs rdiff -u -r1.61 -r1.62 src/sys/netinet/in_gif.c cvs rdiff -u -r1.127 -r1.128 src/sys/netinet/ip_icmp.c cvs rdiff -u -r1.297 -r1.298 src/sys/netinet/ip_input.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/igmp.c diff -u src/sys/netinet/igmp.c:1.52 src/sys/netinet/igmp.c:1.53 --- src/sys/netinet/igmp.c:1.52 Sun Jul 17 20:54:53 2011 +++ src/sys/netinet/igmp.c Mon Jan 9 14:31:21 2012 @@ -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 @@ igmp_input(struct mbuf *m, ...) } 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; } Index: src/sys/netinet/in_gif.c diff -u src/sys/netinet/in_gif.c:1.61 src/sys/netinet/in_gif.c:1.62 --- src/sys/netinet/in_gif.c:1.61 Sun Jul 17 20:54:53 2011 +++ src/sys/netinet/in_gif.c Mon Jan 9 14:31:22 2012 @@ -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 @@ in_gif_output(struct ifnet *ifp, int fam 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 *); Index: src/sys/netinet/ip_icmp.c diff -u src/sys/netinet/ip_icmp.c:1.127 src/sys/netinet/ip_icmp.c:1.128 --- src/sys/netinet/ip_icmp.c:1.127 Sat Dec 31 20:41:58 2011 +++ src/sys/netinet/ip_icmp.c Mon Jan 9 14:31:22 2012 @@ -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 @@ icmp_input(struct mbuf *m, ...) 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; } Index: src/sys/netinet/ip_input.c diff -u src/sys/netinet/ip_input.c:1.297 src/sys/netinet/ip_input.c:1.298 --- src/sys/netinet/ip_input.c:1.297 Mon Dec 19 11:59:56 2011 +++ src/sys/netinet/ip_input.c Mon Jan 9 14:31:22 2012 @@ -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 @@ ip_input(struct mbuf *m) 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; }