mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-13 22:58:42 +00:00
Assign bucket of ancestor node to leaf node
This commit is contained in:
parent
67e6a3e351
commit
aa611e48e0
@ -182,7 +182,7 @@ get_ancestor_bucket(const struct trie_node *node)
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (node->parent == NULL)
|
if (node->parent == NULL)
|
||||||
return NULL;
|
return node->bucket;
|
||||||
|
|
||||||
if (node->parent->bucket != NULL)
|
if (node->parent->bucket != NULL)
|
||||||
return node->parent->bucket;
|
return node->parent->bucket;
|
||||||
@ -204,6 +204,7 @@ first_pass(struct trie_node *node, slab *trie_slab)
|
|||||||
if (is_leaf(node))
|
if (is_leaf(node))
|
||||||
{
|
{
|
||||||
node->potential_buckets[node->potential_buckets_count++] = get_ancestor_bucket(node);
|
node->potential_buckets[node->potential_buckets_count++] = get_ancestor_bucket(node);
|
||||||
|
//node->potential_buckets[node->potential_buckets_count++] = node->bucket;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user