From 3082f99c48abad6e04eaebb8b775e762bd18429a Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Thu, 11 Apr 2019 13:56:06 -0400 Subject: [PATCH] zebra: Remove uneeded zebra_nhg_cmp() function Removed a static function that did not need to be there. The nhg_connected_cmp() function provides all the needed functionality for comparing ID's in the RB tree. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index eb2454b52f..e5c4520c70 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -363,10 +363,10 @@ bool zebra_nhg_hash_id_equal(const void *arg1, const void *arg2) } /** - * zebra_nhg_cmp() - Compare the ID's of two nhe's + * nhg_connected cmp() - Compare the ID's of two connected nhg's * - * @nhe1: Nexthop group hash entry #1 - * @nhe2: Nexthop group hash entry #2 + * @con1: Connected group entry #1 + * @con2: Connected group entry #2 * * Return: * - Negative: #1 < #2 @@ -375,16 +375,10 @@ bool zebra_nhg_hash_id_equal(const void *arg1, const void *arg2) * * This is used in the nhg RB trees. */ -static int zebra_nhg_cmp(const struct nhg_hash_entry *nhe1, - const struct nhg_hash_entry *nhe2) +static int nhg_connected_cmp(const struct nhg_connected *con1, + const struct nhg_connected *con2) { - return nhe1->id - nhe2->id; -} - -static int nhg_connected_cmp(const struct nhg_connected *dep1, - const struct nhg_connected *dep2) -{ - return zebra_nhg_cmp(dep1->nhe, dep2->nhe); + return (con1->nhe->id - con2->nhe->id); } /**