]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Second pass doesn't need protocol
authorIgor Putovny <igor.putovny@nic.cz>
Wed, 25 Sep 2024 11:00:57 +0000 (13:00 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 26 Sep 2024 13:20:03 +0000 (15:20 +0200)
proto/aggregator/aggregator.c

index f3d71c1d296d43baf920492b9963e485f357d187..3a3a27793cf187d9f37865492436fcabefdc26d4 100644 (file)
@@ -379,7 +379,7 @@ first_pass(struct trie_node *node)
  * Second pass of Optimal Route Table Construction (ORTC) algorithm
  */
 static void
-second_pass(struct aggregator_proto *p, struct trie_node *node)
+second_pass(struct trie_node *node)
 {
   assert(node != NULL);
   assert(node->potential_buckets_count <= MAX_POTENTIAL_BUCKETS_COUNT);
@@ -390,7 +390,6 @@ second_pass(struct aggregator_proto *p, struct trie_node *node)
 
     /* The only potential bucket so far is the assigned bucket of the current node */
     assert(BIT32R_TEST(node->potential_buckets, node->bucket->id));
-    assert(get_bucket_ptr(p, node->bucket->id) == node->bucket);
     return;
   }
 
@@ -402,10 +401,10 @@ second_pass(struct aggregator_proto *p, struct trie_node *node)
 
   /* Postorder traversal */
   if (left)
-    second_pass(p, left);
+    second_pass(left);
 
   if (right)
-    second_pass(p, right);
+    second_pass(right);
 
   assert(node->bucket != NULL);
 
@@ -951,7 +950,7 @@ calculate_trie(struct aggregator_proto *p)
 
   times_update(&main_timeloop);
   log("==== SECOND PASS ====");
-  second_pass(p, p->root);
+  second_pass(p->root);
   times_update(&main_timeloop);
   log("==== SECOND PASS DONE");