From owner-svn-src-all@FreeBSD.ORG Fri May 29 11:43:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D03B534; Fri, 29 May 2015 11:43:52 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE2761578; Fri, 29 May 2015 11:43:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4TBhpPC006452; Fri, 29 May 2015 11:43:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4TBhpHB006451; Fri, 29 May 2015 11:43:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505291143.t4TBhpHB006451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 29 May 2015 11:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283705 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2015 11:43:52 -0000 Author: tuexen Date: Fri May 29 11:43:51 2015 New Revision: 283705 URL: https://svnweb.freebsd.org/changeset/base/283705 Log: MFC r275954: Cleanup the code. Reported by: Coverity CID: 1232003 Modified: stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri May 29 11:40:50 2015 (r283704) +++ stable/10/sys/netinet/sctp_usrreq.c Fri May 29 11:43:51 2015 (r283705) @@ -3644,12 +3644,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]; @@ -3657,6 +3651,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 {