svn commit: r368174 - stable/12/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Mon Nov 30 09:12:46 UTC 2020
Author: tuexen
Date: Mon Nov 30 09:12:45 2020
New Revision: 368174
URL: https://svnweb.freebsd.org/changeset/base/368174
Log:
MFC r366482:
Remove dead stores reported by clang static code analysis
Modified:
stable/12/sys/netinet/sctp_input.c
stable/12/sys/netinet/sctp_output.c
stable/12/sys/netinet/sctp_pcb.c
stable/12/sys/netinet/sctputil.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netinet/sctp_input.c
==============================================================================
--- stable/12/sys/netinet/sctp_input.c Mon Nov 30 09:11:24 2020 (r368173)
+++ stable/12/sys/netinet/sctp_input.c Mon Nov 30 09:12:45 2020 (r368174)
@@ -4131,7 +4131,6 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *
struct sctp_idata_chunk *idata_chunk;
uint32_t bottle_bw, on_queue;
uint32_t offset, chk_len;
- uint16_t trunc_len;
uint16_t pktdrp_len;
uint8_t pktdrp_flags;
@@ -4141,13 +4140,10 @@ sctp_handle_packet_dropped(struct sctp_pktdrop_chunk *
pktdrp_len = ntohs(cp->ch.chunk_length);
KASSERT(limit <= pktdrp_len, ("Inconsistent limit"));
if (pktdrp_flags & SCTP_PACKET_TRUNCATED) {
- trunc_len = ntohs(cp->trunc_len);
- if (trunc_len <= pktdrp_len - sizeof(struct sctp_pktdrop_chunk)) {
+ if (ntohs(cp->trunc_len) <= pktdrp_len - sizeof(struct sctp_pktdrop_chunk)) {
/* The peer plays games with us. */
return;
}
- } else {
- trunc_len = 0;
}
limit -= sizeof(struct sctp_pktdrop_chunk);
offset = 0;
Modified: stable/12/sys/netinet/sctp_output.c
==============================================================================
--- stable/12/sys/netinet/sctp_output.c Mon Nov 30 09:11:24 2020 (r368173)
+++ stable/12/sys/netinet/sctp_output.c Mon Nov 30 09:12:45 2020 (r368174)
@@ -8822,7 +8822,7 @@ no_data_fill:
* the top of the for, but just to make sure
* I will reset these again here.
*/
- ctl_cnt = bundle_at = 0;
+ ctl_cnt = 0;
continue; /* This takes us back to the
* for() for the nets. */
} else {
@@ -9423,7 +9423,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
uint32_t dmtu = 0;
SCTP_TCB_LOCK_ASSERT(stcb);
- tmr_started = ctl_cnt = bundle_at = error = 0;
+ tmr_started = ctl_cnt = 0;
no_fragmentflg = 1;
fwd_tsn = 0;
*cnt_out = 0;
Modified: stable/12/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/12/sys/netinet/sctp_pcb.c Mon Nov 30 09:11:24 2020 (r368173)
+++ stable/12/sys/netinet/sctp_pcb.c Mon Nov 30 09:12:45 2020 (r368174)
@@ -4394,7 +4394,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockadd
LIST_INSERT_HEAD(head, stcb, sctp_asocs);
SCTP_INP_INFO_WUNLOCK();
- if ((err = sctp_add_remote_addr(stcb, firstaddr, NULL, port, SCTP_DO_SETSCOPE, SCTP_ALLOC_ASOC))) {
+ if (sctp_add_remote_addr(stcb, firstaddr, NULL, port, SCTP_DO_SETSCOPE, SCTP_ALLOC_ASOC)) {
/* failure.. memory error? */
if (asoc->strmout) {
SCTP_FREE(asoc->strmout, SCTP_M_STRMO);
Modified: stable/12/sys/netinet/sctputil.c
==============================================================================
--- stable/12/sys/netinet/sctputil.c Mon Nov 30 09:11:24 2020 (r368173)
+++ stable/12/sys/netinet/sctputil.c Mon Nov 30 09:12:45 2020 (r368174)
@@ -1723,7 +1723,6 @@ sctp_timeout_handler(void *t)
stcb = (struct sctp_tcb *)tmr->tcb;
net = (struct sctp_nets *)tmr->net;
CURVNET_SET((struct vnet *)tmr->vnet);
- did_output = 1;
released_asoc_reference = false;
#ifdef SCTP_AUDITING_ENABLED
@@ -1992,7 +1991,6 @@ sctp_timeout_handler(void *t)
op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
"Shutdown guard timer expired");
sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED);
- did_output = true;
/* no need to unlock on tcb its gone */
goto out_decr;
@@ -2070,7 +2068,6 @@ sctp_timeout_handler(void *t)
#ifdef INVARIANTS
panic("Unknown timer type %d", type);
#else
- did_output = false;
goto out;
#endif
}
@@ -2153,7 +2150,6 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s
("sctp_timer_start of type %d: inp = %p, stcb->sctp_ep %p",
t_type, stcb, stcb->sctp_ep));
tmr = NULL;
- to_ticks = 0;
if (stcb != NULL) {
SCTP_TCB_LOCK_ASSERT(stcb);
} else if (inp != NULL) {
More information about the svn-src-stable
mailing list