From nobody Thu Jan 11 12:47:12 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9kvh2fhPz55fQh; Thu, 11 Jan 2024 12:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9kvh20KYz47gf; Thu, 11 Jan 2024 12:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ggsvgIzYXm/6fv8vev2sDKtqYUCqn8f08frm1A/Xnb4=; b=Z4GkyB1oI5Bk/KJIuKjnF/WJ1AnYS6a2GgGn5e3BrwMryrxVeC+lWt3/n4nOYUA3+fEu0M Los7h/6m4McCRJEg23hupT6pvhlqDF/x2cgDdGVceoP5G4MVQds02UblO3KSk0Bhq6TtYp sbr2Qfa7FiRzezdh08AbJUxTl4fUJCrqfirUm5DzX96hNzWEC/ErTA+pK+CLth9VqAU5Av WU/iqTcv+9Llv3520m1LN0Fc/G6lQEOmHv3VD2Mp3z1gTuJMssMLy0k+1vplI9J4jw8M9B IL6fUllD+e2WUOcVlmG+Xj/GOQL83HA+9pElw7w07l6ZcHrrDRdihOPVIpDC0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704977232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ggsvgIzYXm/6fv8vev2sDKtqYUCqn8f08frm1A/Xnb4=; b=SFxqy5YZFSbg9sRyc7yQheGU8UBa+rqCRFDH9QHX5j5+pTnNF35ehqg+J2kMU+3/y7Vkkc AGi0VvaCvYC0EFGKWQjrTuAvj8YmtfmGV6cOPudYfxYEpgoCtmelrjLxK5UJxq1PNjrsWv jJqTiW0tC8u+5ySMN5YVxf/o+LKgPnHNGt2ZhxJnh/obLzjgwV/L5KUkgRzFfEoYowbBBl 4i3Ch2Iqnwfz+hZVxFJicfm+yhFC99NkAZHACmlSlEJHltRadqOl/AkalEgbts2jDFPc1x xb/JImKdGWaOmES21aTZ4FwzIlH7Ua+VQk0ZV00yujRboVeyB4gDsZYEAwyKqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704977232; a=rsa-sha256; cv=none; b=EjFuFpfXhFicCxn5nbivyWhJEqR8Z8RMvOg3IG/YSQ1LrNlVnBBUSy57sktr+limMtITsS 7wih+7wFFbGkQrRCAvLSD6xjw3W3fbIbHZGcQnexefYuO970nGhLbZux9fu+oucG9DU6Xb DEYsF7TrXqXmq0BCShynhECB0nTmr9vh4l9/bPGvvSuc8zly1YfBcLoZLiwfsHv/aZUsIN 1LfKISDR7ahFKofqBaNucSQz5a7QEfOO0M4eP/g4F3V7Rn8IUgTVmyb1KJPG32jEjgHW7e IRa35E8L9f66Ru+kEhiuigXfhbGZd8ochaY3qHwtAViTt6PDXeaD0AzmMhNcxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9kvh0mlNzJqn; Thu, 11 Jan 2024 12:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40BClC9Z035776; Thu, 11 Jan 2024 12:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40BClCvZ035773; Thu, 11 Jan 2024 12:47:12 GMT (envelope-from git) Date: Thu, 11 Jan 2024 12:47:12 GMT Message-Id: <202401111247.40BClCvZ035773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: eb62bba325f3 - stable/13 - sctp: fix a warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb62bba325f31384a6ae193c655dc1f5ca43f2c7 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=eb62bba325f31384a6ae193c655dc1f5ca43f2c7 commit eb62bba325f31384a6ae193c655dc1f5ca43f2c7 Author: Michael Tuexen AuthorDate: 2023-08-19 11:24:02 +0000 Commit: Michael Tuexen CommitDate: 2024-01-11 12:46:47 +0000 sctp: fix a warning Fix an unused-but-set-variable warning for builds without INVARIANTS. Reported by: O. Hartmann (cherry picked from commit 1095da75032b439d893c0947eda2f3738ecfe494) --- sys/netinet/sctp_input.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index f9e49b7b4f62..f93b066f051f 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -833,14 +833,12 @@ static void sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_flag) { - struct sctp_association *asoc; int some_on_streamwheel; int old_state; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown: handling SHUTDOWN\n"); if (stcb == NULL) return; - asoc = &stcb->asoc; if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { return; @@ -872,7 +870,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, sctp_ulp_notify(SCTP_NOTIFY_PEER_SHUTDOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* reset time */ - (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); + (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); } } if (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_SENT) { @@ -886,8 +884,8 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, /* Now is there unsent data on a stream somewhere? */ some_on_streamwheel = sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED); - if (!TAILQ_EMPTY(&asoc->send_queue) || - !TAILQ_EMPTY(&asoc->sent_queue) || + if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || + !TAILQ_EMPTY(&stcb->asoc.sent_queue) || some_on_streamwheel) { /* By returning we will push more data out */ return; @@ -916,15 +914,12 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sctp_association *asoc; - SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); if (stcb == NULL) { return; } - asoc = &stcb->asoc; /* process according to association state */ if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { @@ -946,8 +941,8 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, * case. */ #ifdef INVARIANTS - if (!TAILQ_EMPTY(&asoc->send_queue) || - !TAILQ_EMPTY(&asoc->sent_queue) || + if (!TAILQ_EMPTY(&stcb->asoc.send_queue) || + !TAILQ_EMPTY(&stcb->asoc.sent_queue) || sctp_is_there_unsent_data(stcb, SCTP_SO_NOT_LOCKED)) { panic("Queues are not empty when handling SHUTDOWN-ACK"); }