mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 20:58:44 +00:00
Fix incorrect implementation of the third pass
This commit is contained in:
parent
2d2354f54e
commit
7213cc08f3
@ -470,6 +470,7 @@ third_pass(struct trie_node *node)
|
|||||||
{
|
{
|
||||||
assert(node->potential_buckets_count > 0);
|
assert(node->potential_buckets_count > 0);
|
||||||
node->bucket = node->potential_buckets[0];
|
node->bucket = node->potential_buckets[0];
|
||||||
|
goto descent;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct aggregator_bucket *inherited_bucket = get_ancestor_bucket(node);
|
const struct aggregator_bucket *inherited_bucket = get_ancestor_bucket(node);
|
||||||
@ -490,8 +491,9 @@ third_pass(struct trie_node *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Postorder traversal */
|
/* Postorder traversal */
|
||||||
third_pass(node->child[0]);
|
descent:
|
||||||
third_pass(node->child[1]);
|
third_pass(node->child[0]);
|
||||||
|
third_pass(node->child[1]);
|
||||||
|
|
||||||
/* Leaves with no assigned bucket are removed */
|
/* Leaves with no assigned bucket are removed */
|
||||||
if (node->bucket == NULL && is_leaf(node))
|
if (node->bucket == NULL && is_leaf(node))
|
||||||
|
Loading…
Reference in New Issue
Block a user