zebra: use break instead of goto

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 <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2024-01-20 18:50:49 -05:00
parent af6499d052
commit 63816f7579

View File

@ -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