svn commit: r275954 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sat Dec 20 13:47:40 UTC 2014


Author: tuexen
Date: Sat Dec 20 13:47:38 2014
New Revision: 275954
URL: https://svnweb.freebsd.org/changeset/base/275954

Log:
  Cleanup the code.
  
  Reported by:	Coverity
  CID:		1232003

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Sat Dec 20 13:33:31 2014	(r275953)
+++ head/sys/netinet/sctp_usrreq.c	Sat Dec 20 13:47:38 2014	(r275954)
@@ -3643,12 +3643,6 @@ flags_out:
 			    (sid < stcb->asoc.streamoutcnt) &&
 			    ((policy == SCTP_PR_SCTP_ALL) ||
 			    (PR_SCTP_VALID_POLICY(policy)))) {
-#else
-			if ((stcb != NULL) &&
-			    (policy != SCTP_PR_SCTP_NONE) &&
-			    (sid < stcb->asoc.streamoutcnt) &&
-			    (policy == SCTP_PR_SCTP_ALL)) {
-#endif
 				if (policy == SCTP_PR_SCTP_ALL) {
 					sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[0];
 					sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[0];
@@ -3656,6 +3650,13 @@ flags_out:
 					sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[policy];
 					sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[policy];
 				}
+#else
+			if ((stcb != NULL) &&
+			    (policy == SCTP_PR_SCTP_ALL) &&
+			    (sid < stcb->asoc.streamoutcnt)) {
+				sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[0];
+				sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[0];
+#endif
 				SCTP_TCB_UNLOCK(stcb);
 				*optsize = sizeof(struct sctp_prstatus);
 			} else {


More information about the svn-src-head mailing list