From bc107e4e59841f7fbb2ee705a210317a0e887b72 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Mon, 9 Aug 2021 15:58:46 +0200 Subject: [PATCH] sctp: remove some set, but unused variables Thanks to pkasting for submitting the patch for the userland stack. (cherry picked from commit 3808ab732e6a044cc101cf22027a0db2ac4ad58d) --- sys/netinet/sctp_cc_functions.c | 4 +--- sys/netinet/sctp_output.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index 7ad456d08d8..81b9e28f995 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -685,7 +685,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, { struct sctp_nets *net; int old_cwnd; - uint32_t t_ssthresh, t_cwnd, incr; + uint32_t t_ssthresh, incr; uint64_t t_ucwnd_sbw; uint64_t t_path_mptcp; uint64_t mptcp_like_alpha; @@ -694,7 +694,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, /* MT FIXME: Don't compute this over and over again */ t_ssthresh = 0; - t_cwnd = 0; t_ucwnd_sbw = 0; t_path_mptcp = 0; mptcp_like_alpha = 1; @@ -704,7 +703,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, max_path = 0; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { t_ssthresh += net->ssthresh; - t_cwnd += net->cwnd; /* lastsa>>3; we don't need to devide ... */ srtt = net->lastsa; if (srtt > 0) { diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 0f4ddd40753..4fa2e804525 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -12486,7 +12486,7 @@ sctp_lower_sosend(struct socket *so, { struct epoch_tracker et; ssize_t sndlen = 0, max_len, local_add_more; - int error, len; + int error; struct mbuf *top = NULL; int queue_only = 0, queue_only_for_init = 0; int free_cnt_applied = 0; @@ -13046,7 +13046,6 @@ sctp_lower_sosend(struct socket *so, */ local_add_more = sndlen; } - len = 0; if (non_blocking) { goto skip_preblock; } @@ -13247,7 +13246,6 @@ sctp_lower_sosend(struct socket *so, } sctp_snd_sb_alloc(stcb, sndout); atomic_add_int(&sp->length, sndout); - len += sndout; if (sinfo_flags & SCTP_SACK_IMMEDIATELY) { sp->sinfo_flags |= SCTP_SACK_IMMEDIATELY; } -- 2.45.2