From nobody Thu Oct 31 14:05:28 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 4XfQkJ40Tsz5blP2; Thu, 31 Oct 2024 14:05:28 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfQkJ3C1Gz43xL; Thu, 31 Oct 2024 14:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730383528; 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=Kqj91ZiYgZClxFp6pdxp5KEDWB7WLQ5KFBeAIt2VysE=; b=FZ44Zs1Xx9bRknNrzWPoUrD6w81hEJfcQPiO5XrW2jz4bjM1rKS0gAbxNCGpAlmfT18Q6r wz+z551RCPt1ZeFoG9ATt+5WKkd3v8px30syXJz0vsi/Y1nLzmeVOdhv5YPl8sw93oNzlJ RP5nieqL0fJJgzWcc2PSzVHeFNMjLTFYeN9ggUHNeIODGx2vAspBFl3LlDBqKtCiN2YfvI VickmXriBM/YtF6P+KU5/swrON3XexlPED10dFgKzWmGVsC78k6q904mrblt4cXo/YLyxc CiA1eIo1dAbkC7FsCQAcfhJjmD34UfdaGAlOsobZOdKuA+i4GThzcpZN4fe26g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730383528; 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=Kqj91ZiYgZClxFp6pdxp5KEDWB7WLQ5KFBeAIt2VysE=; b=wrQM6zcVoPxEN06yNrbctUsB/lyjFp2YIkT3oEBBwV4ILwHHFNCMd0sPPL04UbLGWxL48H BbY4eHZAxjisg/FbaeWcb6XgElSKMNn9f+RnZXWY5m14rcLGzt2Vs71Bu4VzuNKR0zurbb 30Q7Kzrub8IuC1XDzVJO/V9IXDsL/gOOUpaP+Js/glNg5//UQ36xv+YkLTryZ679coH19w cjsn7TKMj0UcQVnBrmzEwdQsplmStlphiPYjyquX+yeKgOR5R1Fu4jGpbetr0V85w/FuVH g1NmEyfD3nZYWOVugpwm4vAqHzIOoWmKY8vrPoRiu5On+giFCxGJiNAPxyEmBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730383528; a=rsa-sha256; cv=none; b=KLzTVfNej4Stm2lfgLC7yaXEe7oOXtnQzfJEDLIMQVhMhm12P/V9F1Nsxmc6/EmI+lsIef c5R0wNiGdLLbsAV+UxzoLr1Jlt8gUvW97N2jGV7fqkzihfORQa+98k+qtqOoriVjELlZnh hZfGUa9U2OJS07dgddpdfgEw7k+GGv3UmcRT/KXyJsQfpr2sTjUCo2tY5pOp3y3wFBJYaW SW3l4yIofrRr0zw82QnBLUDAGzUPIklYhTN41xwWlxfumOa8DCmgYqMPONBhNz3dxFE1tZ ozmEl2HUZa08bifs6E2MALhjfslGR7buayNEhvNao/VPEIaWUG/YGq35Qb4hEw== 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 4XfQkJ2WLwzfM5; Thu, 31 Oct 2024 14:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VE5Scl050392; Thu, 31 Oct 2024 14:05:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VE5SYV050389; Thu, 31 Oct 2024 14:05:28 GMT (envelope-from git) Date: Thu, 31 Oct 2024 14:05:28 GMT Message-Id: <202410311405.49VE5SYV050389@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: d27f63fa8cbf - stable/14 - sctp: another cleanup 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: d27f63fa8cbfe4ea576c39233a602d96953dc444 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d27f63fa8cbfe4ea576c39233a602d96953dc444 commit d27f63fa8cbfe4ea576c39233a602d96953dc444 Author: Michael Tuexen AuthorDate: 2024-10-27 14:01:45 +0000 Commit: Michael Tuexen CommitDate: 2024-10-31 11:44:02 +0000 sctp: another cleanup No functional change intended. (cherry picked from commit d08713dcdb158b2f55a885e7cfbbe410272c55a2) --- sys/netinet/sctp_pcb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 90eb5822cbb7..0030c5385390 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -543,7 +543,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, } else { /* * The last IFN gets the address, remove the - * old one + * old one. */ SCTPDBG(SCTP_DEBUG_PCB4, "Moving ifa %p from %s (0x%x) to %s (0x%x)\n", @@ -691,13 +691,14 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr, uint32_t ifn_index, const char *if_name) { struct sctp_vrf *vrf; - struct sctp_ifa *sctp_ifap = NULL; + struct sctp_ifa *sctp_ifap; SCTP_IPI_ADDR_WLOCK(); vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id); - goto out_now; + SCTP_IPI_ADDR_WUNLOCK(); + return; } #ifdef SCTP_DEBUG @@ -705,10 +706,10 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr, SCTPDBG_ADDR(SCTP_DEBUG_PCB4, addr); #endif sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED); - if (sctp_ifap) { + if (sctp_ifap != NULL) { /* Validate the delete */ if (sctp_ifap->ifn_p) { - int valid = 0; + bool valid = false; /*- * The name has priority over the ifn_index @@ -717,13 +718,13 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr, if (if_name) { if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) == 0) { /* They match its a correct delete */ - valid = 1; + valid = true; } } if (!valid) { /* last ditch check ifn_index */ if (ifn_index == sctp_ifap->ifn_p->ifn_index) { - valid = 1; + valid = true; } } if (!valid) { @@ -757,9 +758,8 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr, } #endif -out_now: SCTP_IPI_ADDR_WUNLOCK(); - if (sctp_ifap) { + if (sctp_ifap != NULL) { struct sctp_laddr *wi; wi = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), struct sctp_laddr);