]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Remove unused code
authorIgor Putovny <igor.putovny@nic.cz>
Fri, 10 May 2024 13:58:02 +0000 (15:58 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 30 May 2024 10:30:00 +0000 (12:30 +0200)
proto/aggregator/aggregator.c

index 311a237dac64b68c1e3b78fbe31179f60cb2fa24..f3a410fa44f471e9b675f94c5a225ee9b5714c03 100644 (file)
@@ -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