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.
This commit is contained in:
parent
7650d4b67e
commit
371c917b0b
@ -183,7 +183,7 @@ struct nhgrp_priv *
|
|||||||
unlink_nhgrp(struct nh_control *ctl, struct nhgrp_priv *key)
|
unlink_nhgrp(struct nh_control *ctl, struct nhgrp_priv *key)
|
||||||
{
|
{
|
||||||
struct nhgrp_priv *nhg_priv_ret;
|
struct nhgrp_priv *nhg_priv_ret;
|
||||||
int ret, idx;
|
int idx;
|
||||||
|
|
||||||
NHOPS_WLOCK(ctl);
|
NHOPS_WLOCK(ctl);
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ unlink_nhgrp(struct nh_control *ctl, struct nhgrp_priv *key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
idx = nhg_priv_ret->nhg_idx;
|
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->nhg_idx = 0;
|
||||||
nhg_priv_ret->nh_control = NULL;
|
nhg_priv_ret->nh_control = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user