git: 86f499e00177 - stable/13 - unlink_nhgrp: Remove write-only variable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Jan 2023 21:24:41 UTC
The branch stable/13 has been updated by melifaro:
URL: https://cgit.FreeBSD.org/src/commit/?id=86f499e001779cd2f4379693aa4d9c2d00d24c70
commit 86f499e001779cd2f4379693aa4d9c2d00d24c70
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-06 23:45:27 +0000
Commit: Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-01-13 21:18:25 +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.
(cherry picked from commit 371c917b0b450d1944bf0ea18afdfc158af08f2e)
---
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 d93fd5053c30..de53c792aea9 100644
--- a/sys/net/route/nhgrp.c
+++ b/sys/net/route/nhgrp.c
@@ -188,7 +188,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);
@@ -201,7 +201,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;