summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-03-29 01:10:46 +0000
committersam <sam@FreeBSD.org>2005-03-29 01:10:46 +0000
commit0f999925e827e39fc83c5bf1abc2ab5b7e126f80 (patch)
treeb51ab99c8235e257cab87ea27512f72f68ccf902 /sys/netinet/raw_ip.c
parent228e0be5211f51cc821c0667d812ab1d5bd59814 (diff)
downloadFreeBSD-src-0f999925e827e39fc83c5bf1abc2ab5b7e126f80.zip
FreeBSD-src-0f999925e827e39fc83c5bf1abc2ab5b7e126f80.tar.gz
eliminate extraneous null ptr checks
Noticed by: Coverity Prevent analysis tool
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 7e92d68..8d32279 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -580,11 +580,11 @@ rip_attach(struct socket *so, int proto, struct thread *td)
INP_INFO_WUNLOCK(&ripcbinfo);
return EINVAL;
}
- if (td && jailed(td->td_ucred) && !jail_allow_raw_sockets) {
+ if (jailed(td->td_ucred) && !jail_allow_raw_sockets) {
INP_INFO_WUNLOCK(&ripcbinfo);
return (EPERM);
}
- if (td && (error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL)) != 0) {
+ if ((error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL)) != 0) {
INP_INFO_WUNLOCK(&ripcbinfo);
return error;
}
OpenPOWER on IntegriCloud