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;
if (src)
return src;
- src = sl_alloc(rte_src_slab);
+ src = sl_allocz(rte_src_slab);
src->proto = p;
src->private_id = id;
src->global_id = idm_alloc(&src_ids);
for (; o; o = o->next)
{
- struct nexthop *n = sl_alloc(nexthop_slab(o));
+ struct nexthop *n = sl_allocz(nexthop_slab(o));
n->gw = o->gw;
n->iface = o->iface;
n->next = NULL;
struct bfd_iface *ifa = bfd_get_iface(p, local, iface);
- struct bfd_session *s = sl_alloc(p->session_slab);
- bzero(s, sizeof(struct bfd_session));
-
+ struct bfd_session *s = sl_allocz(p->session_slab);
s->addr = addr;
s->ifa = ifa;
s->loc_id = bfd_get_free_id(p);
px->buck_node.next = NULL;
px->buck_node.prev = NULL;
+ px->next = NULL;
px->hash = hash;
px->path_id = path_id;
net_copy(px->net, net);
if (e)
return e;
- e = sl_alloc(f->hash_slab);
- bzero(e, sizeof(struct top_hash_entry));
-
+ e = sl_allocz(f->hash_slab);
e->color = OUTSPF;
e->dist = LSINFINITY;
e->lsa.type_raw = type;