summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2013-01-25 20:14:27 +0000
committernp <np@FreeBSD.org>2013-01-25 20:14:27 +0000
commit509025771867812f51d827c44420628577f0ab46 (patch)
tree1567d34b8cc940f8541f701f63c25b0938313fd3
parent92b7af27e664209450d0067a7b84a0efda95d22e (diff)
downloadFreeBSD-src-509025771867812f51d827c44420628577f0ab46.zip
FreeBSD-src-509025771867812f51d827c44420628577f0ab46.tar.gz
Remove redundant test, we know inp_lport is 0.
MFC after: 1 week
-rw-r--r--sys/netinet/in_pcb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 6706bc4..f5e2ef2 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -334,8 +334,7 @@ in_pcbbind(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred)
if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY)
return (EINVAL);
- anonport = inp->inp_lport == 0 && (nam == NULL ||
- ((struct sockaddr_in *)nam)->sin_port == 0);
+ anonport = nam == NULL || ((struct sockaddr_in *)nam)->sin_port == 0;
error = in_pcbbind_setup(inp, nam, &inp->inp_laddr.s_addr,
&inp->inp_lport, cred);
if (error)
OpenPOWER on IntegriCloud