struct domain *dp;
domain_guard_t guard;
- entry = _MALLOC(sizeof (*entry), M_IFADDR, M_WAITOK);
+ entry = _MALLOC(sizeof (*entry), M_IFADDR, M_WAITOK | M_ZERO);
if (entry == NULL)
return (ENOMEM);
- bzero(entry, sizeof (*entry));
entry->protocol = protocol;
entry->input = input;
entry->detached = detached;
mbuf_t packet_list;
int i, locked = 0;
- lck_mtx_assert(&inp->input_lck, LCK_MTX_ASSERT_NOTOWNED);
+ LCK_MTX_ASSERT(&inp->input_lck, LCK_MTX_ASSERT_NOTOWNED);
if (inp->input_waiting & DLIL_PROTO_REGISTER) {
lck_mtx_lock_spin(&inp->input_lck);
}
proto_family = (struct proto_family_str *)
- _MALLOC(sizeof (struct proto_family_str), M_IFADDR, M_WAITOK);
+ _MALLOC(sizeof (struct proto_family_str), M_IFADDR,
+ M_WAITOK | M_ZERO);
if (!proto_family) {
lck_mtx_unlock(proto_family_mutex);
return (ENOMEM);
}
- bzero(proto_family, sizeof (struct proto_family_str));
proto_family->proto_family = protocol_family;
proto_family->if_family = interface_family & 0xffff;
proto_family->attach_proto = attach;