0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 07:31:54 +00:00

Use sl_allocz() for node allocation

This commit is contained in:
Igor Putovny 2024-05-31 16:19:56 +02:00
parent 268b8a39d7
commit b7f7c11ea7

View File

@ -82,12 +82,7 @@ is_leaf(const struct trie_node *node)
static struct trie_node * static struct trie_node *
create_new_node(slab *trie_slab) create_new_node(slab *trie_slab)
{ {
struct trie_node *new = sl_alloc(trie_slab); return sl_allocz(trie_slab);
assert(new != NULL);
*new = (struct trie_node) { 0 };
assert(new->bucket == NULL);
return new;
} }
/* /*