diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 94d57225c20b..7c615b4cd02c 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -4683,23 +4683,20 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, break; } if (send_out) { - int cnt; uint16_t strm; if (strrst->srs_number_streams) { - for (i = 0, cnt = 0; i < strrst->srs_number_streams; i++) { + for (i = 0; i < strrst->srs_number_streams; i++) { strm = strrst->srs_stream_list[i]; if (stcb->asoc.strmout[strm].state == SCTP_STREAM_OPEN) { stcb->asoc.strmout[strm].state = SCTP_STREAM_RESET_PENDING; - cnt++; } } } else { /* Its all */ - for (i = 0, cnt = 0; i < stcb->asoc.streamoutcnt; i++) { + for (i = 0; i < stcb->asoc.streamoutcnt; i++) { if (stcb->asoc.strmout[i].state == SCTP_STREAM_OPEN) { stcb->asoc.strmout[i].state = SCTP_STREAM_RESET_PENDING; - cnt++; } } }