0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Simplify delete_trie() function

This commit is contained in:
Igor Putovny 2023-10-13 15:26:03 +02:00
parent 1cf73f74ac
commit dca392e7c6

View File

@ -122,12 +122,6 @@ delete_trie(struct trie_node *node)
{
assert(node != NULL);
if (is_leaf(node))
{
remove_node(node);
return;
}
if (node->child[0])
delete_trie(node->child[0]);
@ -135,7 +129,7 @@ delete_trie(struct trie_node *node)
delete_trie(node->child[1]);
assert(is_leaf(node));
delete_trie(node);
remove_node(node);
}
/*