From 8a933360bb7dfbc756795a8717a8d80a2bbf4dbf Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Fri, 24 Jan 2025 14:28:10 +0100 Subject: [PATCH] Remove unused code --- proto/aggregator/aggregator.c | 36 ----------------------------------- 1 file changed, 36 deletions(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 3ea6a7f87..03290575d 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -779,42 +779,6 @@ check_ancestors_after_aggregation(const struct trie_node *node) check_ancestors_after_aggregation(node->child[1]); } -/* - * Recover trie to the state before aggregation - */ -static void -deaggregate(struct trie_node *node) -{ - assert(node != NULL); - - node->status = NON_FIB; - node->selected_bucket = NULL; - node->ancestor = NULL; - node->potential_buckets_count = 0; - memset(node->potential_buckets, 0, sizeof(node->potential_buckets)); - - if (ORIGINAL == node->px_origin) - { - assert(node->original_bucket != NULL); - node->status = IN_FIB; - } - else - { - /* - * Delete the original bucket as it is inherited from the closest - * ancestor and will be set during first pass - */ - assert(node->original_bucket != NULL); - node->original_bucket = NULL; - } - - if (node->child[0]) - deaggregate(node->child[0]); - - if (node->child[1]) - deaggregate(node->child[1]); -} - /* * Merge sets of potential buckets going from @node upwards. * Stop when sets don't change and return the last updated node. -- 2.47.2