]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: use break instead of goto 15184/head
authorDonald Sharp <sharpd@nvidia.com>
Sat, 20 Jan 2024 23:50:49 +0000 (18:50 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 21 Jan 2024 01:08:05 +0000 (20:08 -0500)
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>
zebra/zebra_nhg.c

index 93758cca20177f050e9bf3edcc5ef5c12fd352c8..9e3aa8bc5c8e3f3b1ebd6d9d2231d9048a6a5a28 100644 (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