From nobody Wed Apr 6 23:46:05 2022 X-Original-To: dev-commits-src-main@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 DE3CC1A82F35; Wed, 6 Apr 2022 23:46:06 +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 4KYh3d5G1rz4R1P; Wed, 6 Apr 2022 23:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288766; 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=qsZ4C57RCbIaHLtDVMYZAOlblt4gxXVEJCzsS0slxtU=; b=Ov9GavrYtpfxs1ug3u70vaYttJkGVUhWyZEkBg76SfSbsZDFJz5yWbnaKXPg4sa4+snNiC +zRJJv3sUoTk/OCAPbXiX6PQ7+IcHhKSPd3E30goQBFLD8kssMj4L+Y6SNL2xWSXFAMDU8 Zy4XKoV2dN8WodbcffKsuhsIXM6tA1VWAK8dlwIQ2Il/G9wEhbOQpCo9t3OgKmlKQLQywC bDF0Lg4Mwe9JI1GsBMH9BOga66s/ea+afJZl8Cf3TgJf3Os3e4Z5pl9F10YEWbOv60yyVN 0XzWH+z/K+rLBLSghrp0+RL13Eq1suXGA3+KS3SjIaMREog4XCC7HFf3UwiFNQ== 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 45AC324DF3; Wed, 6 Apr 2022 23:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 236Nk5fU008769; Wed, 6 Apr 2022 23:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236Nk5uP008768; Wed, 6 Apr 2022 23:46:05 GMT (envelope-from git) Date: Wed, 6 Apr 2022 23:46:05 GMT Message-Id: <202204062346.236Nk5uP008768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 371c917b0b45 - main - unlink_nhgrp: Remove write-only variable. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 371c917b0b450d1944bf0ea18afdfc158af08f2e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288766; 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=qsZ4C57RCbIaHLtDVMYZAOlblt4gxXVEJCzsS0slxtU=; b=aOB9YP4mGSRC4ERL5LjKy6QkRHAHvTCcDqnuqocuipVePV0XYSx5ffUcve2edVZGaUvJwU 3ugP/hlVVw4YD7HRMjTmVc/XQZxX58v89Ke9LiaaO+AoX2QY/UQof5MR2JGU7qZbh6jBm/ 5q4yVDXsYvkTNLltPY0d7KMTERa7qqReUKKmBj9GRI+IuFBXS/RGFOwDhFtKhnyRR5x8LR /V64fewcBD2ooxvG2REx4XuL/dISHfsPOocYTHmrO+ERc4LA0YocHJLCePb9NLlhZBK0rN jPM0LNLlmNuTk/jKSqUdcfbJflooVz0NtXoviu3l9xEA0tz5I7FuXlMAdcH5UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649288766; a=rsa-sha256; cv=none; b=D4qwOe1/ZW49r6FCWTxDo2fI6GFByqeAN7ndw50H6f0lhZ4C5Gn12fmwKDyek6Ck9nNjJa tsXe1str3OfK/j9+1OqDSBuRSXSLZPtezDpc7Huy7jFZ9jwSoaA0kkD2yMe8mc1dWWSeRc Hzx2jcP2MJK8Sno7Wh+8LtbSqndkpIpICSlRIGlQoHJZ4n1Y2bCmCDnegTjQkDUjfNlXoa 6/d9XEfd+n8nTmCZyLCgBW/jAwS0vxgBlz7Iv2xGxXryoQhL+lA/4ngC/Od1nb8bKJ7BBM mAWDPNTBYFCd6VGGQ13t7HbpXlBe032fo1DmJWIqgFhk1nbfn1/Ie30g36Zl+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=371c917b0b450d1944bf0ea18afdfc158af08f2e commit 371c917b0b450d1944bf0ea18afdfc158af08f2e Author: John Baldwin AuthorDate: 2022-04-06 23:45:27 +0000 Commit: John Baldwin CommitDate: 2022-04-06 23:45:27 +0000 unlink_nhgrp: Remove write-only variable. Possibly one could assert that ret should always be 0 here (that is, that there was always an index found in the bitmask). That should be true since a bitmask index is allocated before the nhgrp is inserted in the ctl->gr_head list in link_nhgrp. --- sys/net/route/nhgrp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/route/nhgrp.c b/sys/net/route/nhgrp.c index 07abdf480101..32bcb56460a1 100644 --- a/sys/net/route/nhgrp.c +++ b/sys/net/route/nhgrp.c @@ -183,7 +183,7 @@ struct nhgrp_priv * unlink_nhgrp(struct nh_control *ctl, struct nhgrp_priv *key) { struct nhgrp_priv *nhg_priv_ret; - int ret, idx; + int idx; NHOPS_WLOCK(ctl); @@ -196,7 +196,7 @@ unlink_nhgrp(struct nh_control *ctl, struct nhgrp_priv *key) } idx = nhg_priv_ret->nhg_idx; - ret = bitmask_free_idx(&ctl->nh_idx_head, idx); + bitmask_free_idx(&ctl->nh_idx_head, idx); nhg_priv_ret->nhg_idx = 0; nhg_priv_ret->nh_control = NULL;