1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Some minor sl_allocz() cleanups

This commit is contained in:
Ondrej Zajicek (work)
2020-11-24 03:21:44 +01:00
parent db2d29073a
commit c9ae81656f
5 changed files with 6 additions and 11 deletions

View File

@@ -253,9 +253,7 @@ neigh_find(struct proto *p, ip_addr a, struct iface *iface, uint flags)
if ((scope < 0) && !(flags & NEF_STICKY))
return NULL;
n = sl_alloc(neigh_slab);
memset(n, 0, sizeof(neighbor));
n = sl_allocz(neigh_slab);
add_tail(&neigh_hash_table[h], &n->n);
add_tail((scope >= 0) ? &iface->neighbors : &sticky_neigh_list, &n->if_n);
n->addr = a;