From: Igor Putovny Date: Fri, 10 May 2024 13:58:02 +0000 (+0200) Subject: Remove unused code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9aba7b47bee69f31d1f09152c99c75b613209935;p=thirdparty%2Fbird.git Remove unused code --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 311a237da..f3a410fa4 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -488,9 +488,6 @@ second_pass(struct trie_node *node) assert(node != NULL); assert(node->potential_buckets_count <= MAX_POTENTIAL_BUCKETS_COUNT); - //if (node->parent == NULL) - //assert(node->bucket != NULL); - if (is_leaf(node)) { assert(node->potential_buckets_count == 1); @@ -518,21 +515,6 @@ second_pass(struct trie_node *node) for (int j = i + 1; j < right->potential_buckets_count; j++) assert(right->potential_buckets[i] != right->potential_buckets[j]); - /* - qsort(left->potential_buckets, left->potential_buckets_count, sizeof(struct aggregator_bucket *), aggregator_bucket_compare_wrapper); - qsort(right->potential_buckets, right->potential_buckets_count, sizeof(struct aggregator_bucket *), aggregator_bucket_compare_wrapper); - - for (int i = 1; i < left->potential_buckets_count; i++) - { - assert((uintptr_t)left->potential_buckets[i - 1] < (uintptr_t)left->potential_buckets[i]); - } - - for (int i = 1; i < right->potential_buckets_count; i++) - { - assert((uintptr_t)right->potential_buckets[i - 1] < (uintptr_t)right->potential_buckets[i]); - } - */ - if (bucket_sets_are_disjoint(left, right)) compute_buckets_union(node, left, right); else @@ -570,9 +552,6 @@ third_pass(struct trie_node *node) if (node == NULL) return; - //if (node->parent == NULL) - //assert(node->bucket != NULL); - assert(node->potential_buckets_count <= MAX_POTENTIAL_BUCKETS_COUNT); /* Root is assigned any of its potential buckets */ @@ -580,7 +559,6 @@ third_pass(struct trie_node *node) { assert(node->potential_buckets_count > 0); assert(node->potential_buckets[0] != NULL); - //assert(node->bucket != NULL); node->bucket = node->potential_buckets[0]; } else