diff options
author | np <np@FreeBSD.org> | 2013-01-25 20:14:27 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2013-01-25 20:14:27 +0000 |
commit | 509025771867812f51d827c44420628577f0ab46 (patch) | |
tree | 1567d34b8cc940f8541f701f63c25b0938313fd3 | |
parent | 92b7af27e664209450d0067a7b84a0efda95d22e (diff) | |
download | FreeBSD-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.c | 3 |
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) |