Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 2008 06:01:08 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186170 - head/sys/netinet6
Message-ID:  <200812160601.mBG618xk028382@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Tue Dec 16 06:01:08 2008
New Revision: 186170
URL: http://svn.freebsd.org/changeset/base/186170

Log:
  check pointers against NULL

Modified:
  head/sys/netinet6/raw_ip6.c

Modified: head/sys/netinet6/raw_ip6.c
==============================================================================
--- head/sys/netinet6/raw_ip6.c	Tue Dec 16 05:03:22 2008	(r186169)
+++ head/sys/netinet6/raw_ip6.c	Tue Dec 16 06:01:08 2008	(r186170)
@@ -232,7 +232,7 @@ rip6_input(struct mbuf **mp, int *offp, 
 	/*
 	 * Check AH/ESP integrity.
 	 */
-	if (last && ipsec6_in_reject(m, last)) {
+	if ((last != NULL) && ipsec6_in_reject(m, last)) {
 		m_freem(m);
 		V_ipsec6stat.in_polvio++;
 		V_ip6stat.ip6s_delivered--;
@@ -357,7 +357,7 @@ rip6_output(m, va_alist)
 	INP_WLOCK(in6p);
 
 	dst = &dstsock->sin6_addr;
-	if (control) {
+	if (control != NULL) {
 		if ((error = ip6_setpktopts(control, &opt,
 		    in6p->in6p_outputopts, so->so_cred,
 		    so->so_proto->pr_protocol)) != 0) {
@@ -491,7 +491,7 @@ rip6_output(m, va_alist)
 		m_freem(m);
 
  freectl:
-	if (control) {
+	if (control != NULL) {
 		ip6_clearpktopts(&opt, -1);
 		m_freem(control);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812160601.mBG618xk028382>