From 9ddc33505af6ad1fd99cd23352fc2dc99462afbb Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Tue, 14 May 2019 16:11:00 -0700 Subject: [PATCH] zebra: Remove uneeded is_valid NHE functons Remove some unused is_valid checks for the nhg_hash_entry's. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 20 -------------------- zebra/zebra_nhg.h | 1 - 2 files changed, 21 deletions(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index d9930ae193..26db14036e 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -869,26 +869,6 @@ void zebra_nhg_increment_ref(struct nhg_hash_entry *nhe) } } -static bool zebra_nhg_is_valid(struct nhg_hash_entry *nhe) -{ - if (nhe->flags & NEXTHOP_GROUP_VALID) - return true; - - return false; -} - -bool zebra_nhg_id_is_valid(uint32_t id) -{ - struct nhg_hash_entry *nhe = NULL; - bool is_valid = false; - - nhe = zebra_nhg_lookup_id(id); - - if (nhe) - is_valid = zebra_nhg_is_valid(nhe); - - return is_valid; -} void zebra_nhg_set_invalid(struct nhg_hash_entry *nhe) { if (!zebra_nhg_depends_is_empty(nhe) diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h index ef8b2730fb..31a2a020a0 100644 --- a/zebra/zebra_nhg.h +++ b/zebra/zebra_nhg.h @@ -223,7 +223,6 @@ void zebra_nhg_free(void *arg); void zebra_nhg_decrement_ref(struct nhg_hash_entry *nhe); void zebra_nhg_increment_ref(struct nhg_hash_entry *nhe); -extern bool zebra_nhg_id_is_valid(uint32_t id); void zebra_nhg_set_invalid(struct nhg_hash_entry *nhe); void zebra_nhg_set_if(struct nhg_hash_entry *nhe, struct interface *ifp); -- 2.39.5