From: Donald Sharp Date: Sat, 20 Jan 2024 23:50:49 +0000 (-0500) Subject: zebra: use break instead of goto X-Git-Tag: base_10.0~103^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=63816f7579b2a8a8be55b842913df06277637bb3;p=mirror%2Ffrr.git 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 --- diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 93758cca20..9e3aa8bc5c 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -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