diff options
author | sam <sam@FreeBSD.org> | 2005-03-29 01:10:46 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-03-29 01:10:46 +0000 |
commit | 0f999925e827e39fc83c5bf1abc2ab5b7e126f80 (patch) | |
tree | b51ab99c8235e257cab87ea27512f72f68ccf902 /sys/netinet/udp_usrreq.c | |
parent | 228e0be5211f51cc821c0667d812ab1d5bd59814 (diff) | |
download | FreeBSD-src-0f999925e827e39fc83c5bf1abc2ab5b7e126f80.zip FreeBSD-src-0f999925e827e39fc83c5bf1abc2ab5b7e126f80.tar.gz |
eliminate extraneous null ptr checks
Noticed by: Coverity Prevent analysis tool
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index d96344b..42ee928 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -790,7 +790,7 @@ udp_output(inp, m, addr, control, td) if (addr) { sin = (struct sockaddr_in *)addr; - if (td && jailed(td->td_ucred)) + if (jailed(td->td_ucred)) prison_remote_ip(td->td_ucred, 0, &sin->sin_addr.s_addr); if (inp->inp_faddr.s_addr != INADDR_ANY) { error = EISCONN; @@ -1006,7 +1006,7 @@ udp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) } s = splnet(); sin = (struct sockaddr_in *)nam; - if (td && jailed(td->td_ucred)) + if (jailed(td->td_ucred)) prison_remote_ip(td->td_ucred, 0, &sin->sin_addr.s_addr); error = in_pcbconnect(inp, nam, td->td_ucred); splx(s); |