]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Cleanup
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 18 Feb 2025 16:20:53 +0000 (17:20 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Tue, 18 Feb 2025 16:20:53 +0000 (17:20 +0100)
proto/aggregator/aggregator.c

index af6b1dbdcf3772e914d0d7e0b473a2bb003bfa43..7757068f9ef869a976f31c0775f43bc53fc5e6b6 100644 (file)
@@ -617,8 +617,8 @@ find_subtree_prefix(const struct trie_node *target, ip_addr *prefix, u32 *pxlen,
     else
       ipa_setbit(prefix, node->depth + ipa_shift[type]);
 
-    len++;
     node = node->child[path[i]];
+    len++;
     assert((u32)node->depth == len);
   }
 
@@ -690,6 +690,7 @@ second_pass(struct trie_node *node)
     second_pass(right);
 
   assert(node->original_bucket != NULL);
+  assert(node->selected_bucket == NULL);
 
   /* Imaginary node if this was a complete binary tree */
   struct trie_node imaginary_node = {
@@ -720,8 +721,6 @@ second_pass(struct trie_node *node)
    * children's buckets.
    */
   merge_potential_buckets(node, left, right);
-
-  assert(node->selected_bucket == NULL);
 }
 
 static void