From nobody Sun Oct 27 14:02:29 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 4Xbyrj73rMz5b4rK; Sun, 27 Oct 2024 14:02:29 +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 4Xbyrj6M1lz45cF; Sun, 27 Oct 2024 14:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730037749; 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=m50Xj3/UDWJaXQQDYiUzqzGnXLxSkEYVsVGbY1CCeNA=; b=Zdrywr+cQyP6x1ICEEVOuqxV68HGPZobFaXm18FIkTOTK6ikv64J0F4ebOkB5OLLDr2y5f u3Dcbr6jaLCnPXkHxv7+dG2soqjtzgX9ah/Ir3p8K+EdHTAtTkqRWN07yI+p6up+EyHzVf kMeq78epjuQVi3+sghy8GOCdzFj4Cifnyj5irWvjoExXRcwGHPiILN5cETLdhtEwE9MvGi OD74srgslWlBLJysAU6VgLyFdlRH36lce2QmZXXcsspex6RzmNNDecWrzriOxtfUWjiAer ohkTeTjABgVM6iR3bOnvhY2P5pAfek2SaRVQO5i8kNW5nmxp7/f5FUN5a/AR9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730037749; 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=m50Xj3/UDWJaXQQDYiUzqzGnXLxSkEYVsVGbY1CCeNA=; b=a/2nAdG9+A4S6eD6dNY6nmRm2RqszIqXJ6K3TysXXwOW6olq28stTpRzQ9W9d/sCn4lZcO J8xnQ7j5gpttAdwRZ1wrezaouvzDux7rW/WWHra8VYupDSWxxNDl96ZS2cO5DD7SbRveRU WJ3WC7igJAZz5d0+iL6BEWh4/yJmgJpmuD5tXjMCsOZlZkTUUmWFObDRwEQ2a0us5722DW KnJIhOM35sFlOLz8GccJZT5Y0lGeC/NCc46xw4m5M/70Iq0nMb8LghtopbbB7fMd50BzFA pLSgbD2fm1vJHLmJXWNsVpW1bJy0c2HK7w5SaiBbf+4aP5gvOSlbNJC3RNP5Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730037749; a=rsa-sha256; cv=none; b=hgJKaTShqZWh3g0eul/fKZPWPRvMof3Y0X7C3Wa7jUkTk/H/oV+3L+wJV2BgLpXDg7ICAo Xx2MMtPHYVxWRobc+gJ81MjYeCNoeiinMV97l1k9jIp0KU8pIcK2wOGThgPG6OQVwFawsf IRa6id8EtDIloSjrsBjfAmi8X/8437rlfdrFzL2AQ9I6ey6YSzlBgpN1ymhnfFpZ7niK03 YRp/WcUCnPqwTBz9sdY8A3g8TRNYM1OW9i1qdC51wIzRnOTm7KRCxkzz/HbkTGBCo6aye6 0kuSvVSMnJui7O9eek94nTqjPODIBXywvghSfe6y5lHJRfKB3xZbSxwZMYWEBg== 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 4Xbyrj5yvyzxny; Sun, 27 Oct 2024 14:02:29 +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 49RE2TGA058874; Sun, 27 Oct 2024 14:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49RE2T9Q058871; Sun, 27 Oct 2024 14:02:29 GMT (envelope-from git) Date: Sun, 27 Oct 2024 14:02:29 GMT Message-Id: <202410271402.49RE2T9Q058871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d08713dcdb15 - main - 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/main X-Git-Reftype: branch X-Git-Commit: d08713dcdb158b2f55a885e7cfbbe410272c55a2 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d08713dcdb158b2f55a885e7cfbbe410272c55a2 commit d08713dcdb158b2f55a885e7cfbbe410272c55a2 Author: Michael Tuexen AuthorDate: 2024-10-27 14:01:45 +0000 Commit: Michael Tuexen CommitDate: 2024-10-27 14:01:45 +0000 sctp: another cleanup No functional change intended. MFC after: 3 days --- 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 b69e7d764330..e2248adfdfb6 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);