From 63816f7579b2a8a8be55b842913df06277637bb3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 20 Jan 2024 18:50:49 -0500 Subject: [PATCH] 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 --- zebra/zebra_nhg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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