From owner-svn-src-all@FreeBSD.ORG Tue Dec 16 03:12:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A7DF1065670; Tue, 16 Dec 2008 03:12:45 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 264D28FC08; Tue, 16 Dec 2008 03:12:45 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBG3Cjp4025071; Tue, 16 Dec 2008 03:12:45 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBG3CiVY025068; Tue, 16 Dec 2008 03:12:44 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812160312.mBG3CiVY025068@svn.freebsd.org> From: Kip Macy Date: Tue, 16 Dec 2008 03:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186163 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 03:12:45 -0000 Author: kmacy Date: Tue Dec 16 03:12:44 2008 New Revision: 186163 URL: http://svn.freebsd.org/changeset/base/186163 Log: convert more pointer validation checks to checking against NULL Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/nd6.c head/sys/netinet6/raw_ip6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Tue Dec 16 03:05:18 2008 (r186162) +++ head/sys/netinet6/icmp6.c Tue Dec 16 03:12:44 2008 (r186163) @@ -1947,7 +1947,7 @@ icmp6_rip6_input(struct mbuf **mp, int o INP_RUNLOCK(in6p); continue; } - if (last) { + if (last != NULL) { struct mbuf *n = NULL; /* @@ -2008,7 +2008,7 @@ icmp6_rip6_input(struct mbuf **mp, int o last = in6p; } INP_INFO_RUNLOCK(&V_ripcbinfo); - if (last) { + if (last != NULL) { if (last->inp_flags & IN6P_CONTROLOPTS) ip6_savecontrol(last, m, &opts); /* strip intermediate headers */ Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Tue Dec 16 03:05:18 2008 (r186162) +++ head/sys/netinet6/nd6.c Tue Dec 16 03:12:44 2008 (r186163) @@ -1642,7 +1642,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru return (ln); done: - if (ln) { + if (ln != NULL) { if (flags & ND6_EXCLUSIVE) LLE_WUNLOCK(ln); else @@ -1716,7 +1716,7 @@ nd6_output_lle(struct ifnet *ifp, struct int flags = 0; #ifdef INVARIANTS - if (lle) { + if (lle != NULL) { LLE_WLOCK_ASSERT(lle); Modified: head/sys/netinet6/raw_ip6.c ============================================================================== --- head/sys/netinet6/raw_ip6.c Tue Dec 16 03:05:18 2008 (r186162) +++ head/sys/netinet6/raw_ip6.c Tue Dec 16 03:12:44 2008 (r186163) @@ -193,7 +193,7 @@ rip6_input(struct mbuf **mp, int *offp, continue; } } - if (last) { + if (last != NULL) { struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); #ifdef IPSEC @@ -240,7 +240,7 @@ rip6_input(struct mbuf **mp, int *offp, INP_RUNLOCK(last); } else #endif /* IPSEC */ - if (last) { + if (last != NULL) { if (last->inp_flags & IN6P_CONTROLOPTS || last->inp_socket->so_options & SO_TIMESTAMP) ip6_savecontrol(last, m, &opts);