check pointer against NULL
add new line after declaration for style
This commit is contained in:
parent
aba53ef0a6
commit
3bb87a6c70
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user