svn commit: r323374 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sat Sep 9 20:08:28 UTC 2017


Author: tuexen
Date: Sat Sep  9 20:08:26 2017
New Revision: 323374
URL: https://svnweb.freebsd.org/changeset/base/323374

Log:
  Silence a Coverity warning from scanning the usrsctp library.
  
  MFC after:	3 days

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Sat Sep  9 20:07:04 2017	(r323373)
+++ head/sys/netinet/sctp_pcb.c	Sat Sep  9 20:08:26 2017	(r323374)
@@ -2919,9 +2919,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *ad
 		 */
 		/* got to be root to get at low ports */
 		if (ntohs(lport) < IPPORT_RESERVED) {
-			if (p && (error =
+			if ((p != NULL) && ((error =
 			    priv_check(p, PRIV_NETINET_RESERVEDPORT)
-			    )) {
+			    ) != 0)) {
 				SCTP_INP_DECR_REF(inp);
 				SCTP_INP_WUNLOCK(inp);
 				SCTP_INP_INFO_WUNLOCK();


More information about the svn-src-all mailing list