From 2ff41dd690eab66d7ca12d28cecaab1d5f7b4dc9 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 27 Nov 2023 12:28:52 +0100 Subject: [PATCH] lib: remove useless nexthop_group_active_nexthop_num_no_recurse() The nexthop_group_active_nexthop_num_no_recurse() function is no more used. Let us remove the function call. Fixes: 148813c22a8d ("zebra: zebra_nhg check each nexthop for active, not just number") Signed-off-by: Philippe Guibert --- lib/nexthop_group.c | 14 -------------- lib/nexthop_group.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index c75ff7b4cd..e5c2258191 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -105,20 +105,6 @@ uint8_t nexthop_group_active_nexthop_num(const struct nexthop_group *nhg) return num; } -uint8_t -nexthop_group_active_nexthop_num_no_recurse(const struct nexthop_group *nhg) -{ - struct nexthop *nhop; - uint8_t num = 0; - - for (nhop = nhg->nexthop; nhop; nhop = nhop->next) { - if (CHECK_FLAG(nhop->flags, NEXTHOP_FLAG_ACTIVE)) - num++; - } - - return num; -} - bool nexthop_group_has_label(const struct nexthop_group *nhg) { struct nexthop *nhop; diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h index 78237e464f..88f9c62ccb 100644 --- a/lib/nexthop_group.h +++ b/lib/nexthop_group.h @@ -154,8 +154,6 @@ extern uint8_t nexthop_group_nexthop_num_no_recurse(const struct nexthop_group *nhg); extern uint8_t nexthop_group_active_nexthop_num(const struct nexthop_group *nhg); -extern uint8_t -nexthop_group_active_nexthop_num_no_recurse(const struct nexthop_group *nhg); extern bool nexthop_group_has_label(const struct nexthop_group *nhg);