Skip to content

Commit

Permalink
zebra: use break instead of goto
Browse files Browse the repository at this point in the history
There is a goto statement that would be better served
with a break statement.  Let's try to minimize this
in the code.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Jan 21, 2024
1 parent af6499d commit 63816f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zebra/zebra_nhg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,11 +1082,10 @@ void zebra_nhg_check_valid(struct nhg_hash_entry *nhe)
frr_each(nhg_connected_tree, &nhe->nhg_depends, rb_node_dep) {
if (CHECK_FLAG(rb_node_dep->nhe->flags, NEXTHOP_GROUP_VALID)) {
valid = true;
goto done;
break;
}
}

done:
if (valid)
zebra_nhg_set_valid(nhe);
else
Expand Down

0 comments on commit 63816f7

Please sign in to comment.