diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-12-16 03:18:59 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-12-16 03:18:59 +0000 |
commit | 9be993627ea1d961eba9275a5cde288bfbd79696 (patch) | |
tree | 327e680018e6765f97b12a28f28c96baf9ff156f /sys/netinet | |
parent | c501489004a473932094587f4ddfd72dd192e55c (diff) | |
download | FreeBSD-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.c | 5 |
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 */ |