From nobody Thu Oct 31 17:06:42 2024 X-Original-To: dev-commits-src-branches@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 4XfVlR0plsz5c2xf; Thu, 31 Oct 2024 17:06:43 +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 4XfVlR0676z4pnM; Thu, 31 Oct 2024 17:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730394403; 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=lCSAzlVsHI4Mt/MmwJ+CFbW1FTJWTEeyKlqw/f9AzEU=; b=ZzYqtA9c46A2lJksxkvQLnlsZJSNBdHvl7EgfLMK7NRlsdADDjXjmFwBkAGLQanixj0h2I tWAzAwBlxhudF8rK3DU9Xgs13IeiLnJ6UeSEeSd3ch7soG9Q4R4Uzf6LdDqQf39tCo9z2y 3T+ArhoivgkS/+KnFxShkPaWQhJawfEGHJjRmXpsKLDGbuelPljurZOpLV1FhYNEHPqs9S 1sGsU59OrWoKiCzfKJE3zTwmANqucmIf91eZ1tHm36rqs1sK39ty+CiD0RtQ/ABYmck9e5 TI/oafuUbdqdSvqwGNx17Pwtt73vBG9x8yq80qY3fvq7hEORy1FEr/X1PiayNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730394403; 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=lCSAzlVsHI4Mt/MmwJ+CFbW1FTJWTEeyKlqw/f9AzEU=; b=MktSnX4rQj1BwTRlVHst4irjELwNEDoHe+dpWmfPsJmPP1VoqqDuuZlb/YWeFRXOiTfzQv 79yTzTgMdOEp6mdpMewcFYpy6SbBV3XLBTPlsa36Rfj+65Ltw84x2MByhrnAbhWKzUiel5 GVP2sipysqUwjENQkvRPj1gBylMB54lzj1hHxQAlKwRGcpQaXyd9BbEKSZqeQ62PUgDozg LnVwkUhwB5p1z1+2sbQtBsPC5aLu6I5GT7H4LKhLtBcXRLzdzgXGCb5YeteQ970wfrC/ly /gzWQKY/DYfG+6A1ucIFBJzjy86jXFi9fSuNgYPjajADWL9XtMkeuLdTxu7S8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730394403; a=rsa-sha256; cv=none; b=WTHVYSVUaSKt2MQaDMaXqa/ytiPFjNohZwgbmKakyek5tC9wYUjJz70ww9TUyauCFVI7EO 6xBSre8niJwsKvBkU7GE9bEesqHoI4Bo17GRzDh5Bdc18Iht3gHMeSFWdItBHHnwmGdvNq N/ipUTURhvhYWvQVmhVog1hsasLWNFHR96i234JMqf/VSKfA5buEsUXUbXnC+zavuwkyUY bQbVV7itqzHMN1D+JM6qcvVvGKTo7CEOtekfomzCEZ9i1Yb99/0PjqSUSsWNSEkCrk5rdF ewCdSfcdl+anTuFR2/oYGXbFws+qzzqcnL89ADpXT5d7pkk8dvPcCAwMT1QpOA== 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 4XfVlQ6qw8zkqX; Thu, 31 Oct 2024 17:06:42 +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 49VH6gmg092093; Thu, 31 Oct 2024 17:06:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VH6gLI092090; Thu, 31 Oct 2024 17:06:42 GMT (envelope-from git) Date: Thu, 31 Oct 2024 17:06:42 GMT Message-Id: <202410311706.49VH6gLI092090@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: eac97072d19b - stable/13 - sctp: another cleanup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: eac97072d19b44d131025359e26e15c501d94f8c Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=eac97072d19b44d131025359e26e15c501d94f8c commit eac97072d19b44d131025359e26e15c501d94f8c Author: Michael Tuexen AuthorDate: 2024-10-27 14:01:45 +0000 Commit: Michael Tuexen CommitDate: 2024-10-31 17:06:20 +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 2423aef5a89d..39b7d58c8892 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);