svn commit: r186164 - head/sys/netinet

Kip Macy kmacy at FreeBSD.org
Tue Dec 16 03:18:59 UTC 2008


Author: kmacy
Date: Tue Dec 16 03:18:59 2008
New Revision: 186164
URL: http://svn.freebsd.org/changeset/base/186164

Log:
  check pointer against NULL
  add new line after declaration for style

Modified:
  head/sys/netinet/raw_ip.c

Modified: head/sys/netinet/raw_ip.c
==============================================================================
--- head/sys/netinet/raw_ip.c	Tue Dec 16 03:12:44 2008	(r186163)
+++ head/sys/netinet/raw_ip.c	Tue Dec 16 03:18:59 2008	(r186164)
@@ -280,7 +280,7 @@ rip_input(struct mbuf *m, int off)
 			if (!prison_check_ip4(inp->inp_cred, &ip->ip_dst))
 				continue;
 		}
-		if (last) {
+		if (last != NULL) {
 			struct mbuf *n;
 
 			n = m_copy(m, 0, (int)M_COPYALL);
@@ -310,7 +310,7 @@ rip_input(struct mbuf *m, int off)
 			if (!prison_check_ip4(inp->inp_cred, &ip->ip_dst))
 				continue;
 		}
-		if (last) {
+		if (last != NULL) {
 			struct mbuf *n;
 
 			n = m_copy(m, 0, (int)M_COPYALL);
@@ -964,6 +964,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
 		INP_RLOCK(inp);
 		if (inp->inp_gencnt <= gencnt) {
 			struct xinpcb xi;
+
 			bzero(&xi, sizeof(xi));
 			xi.xi_len = sizeof xi;
 			/* XXX should avoid extra copy */


More information about the svn-src-head mailing list