Skip to content

Commit

Permalink
zebra: Remove function that just calls another function
Browse files Browse the repository at this point in the history
Why not just call the one function?

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Jan 21, 2024
1 parent e37f18b commit af6499d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,13 @@ static int if_zebra_new_hook(struct interface *ifp)
return 0;
}

static void if_nhg_dependents_check_valid(struct nhg_hash_entry *nhe)
{
zebra_nhg_check_valid(nhe);
}

static void if_down_nhg_dependents(const struct interface *ifp)
{
struct nhg_connected *rb_node_dep = NULL;
struct zebra_if *zif = (struct zebra_if *)ifp->info;

frr_each(nhg_connected_tree, &zif->nhg_dependents, rb_node_dep)
if_nhg_dependents_check_valid(rb_node_dep->nhe);
zebra_nhg_check_valid(rb_node_dep->nhe);
}

static void if_nhg_dependents_release(const struct interface *ifp)
Expand All @@ -192,7 +187,7 @@ static void if_nhg_dependents_release(const struct interface *ifp)

frr_each(nhg_connected_tree, &zif->nhg_dependents, rb_node_dep) {
rb_node_dep->nhe->ifp = NULL; /* Null it out */
if_nhg_dependents_check_valid(rb_node_dep->nhe);
zebra_nhg_check_valid(rb_node_dep->nhe);
}
}

Expand Down

0 comments on commit af6499d

Please sign in to comment.