]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Use sl_allocz() for node allocation
authorIgor Putovny <igor.putovny@nic.cz>
Fri, 31 May 2024 14:19:56 +0000 (16:19 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Fri, 31 May 2024 14:19:56 +0000 (16:19 +0200)
proto/aggregator/aggregator.c

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