summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-12-16 03:18:59 +0000
committerkmacy <kmacy@FreeBSD.org>2008-12-16 03:18:59 +0000
commit9be993627ea1d961eba9275a5cde288bfbd79696 (patch)
tree327e680018e6765f97b12a28f28c96baf9ff156f /sys/netinet
parentc501489004a473932094587f4ddfd72dd192e55c (diff)
downloadFreeBSD-src-9be993627ea1d961eba9275a5cde288bfbd79696.zip
FreeBSD-src-9be993627ea1d961eba9275a5cde288bfbd79696.tar.gz
check pointer against NULL
add new line after declaration for style
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/raw_ip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 9b5a3f3..9fe0eca 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -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 */
OpenPOWER on IntegriCloud