svn commit: r245914 - head/sys/netinet

Navdeep Parhar np at FreeBSD.org
Fri Jan 25 20:14:28 UTC 2013


Author: np
Date: Fri Jan 25 20:14:27 2013
New Revision: 245914
URL: http://svnweb.freebsd.org/changeset/base/245914

Log:
  Remove redundant test, we know inp_lport is 0.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/in_pcb.c

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c	Fri Jan 25 19:34:54 2013	(r245913)
+++ head/sys/netinet/in_pcb.c	Fri Jan 25 20:14:27 2013	(r245914)
@@ -334,8 +334,7 @@ in_pcbbind(struct inpcb *inp, struct soc
 
 	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)


More information about the svn-src-all mailing list