- Utilize the great M_ZERO flag rather than allocating memory then do

a call to memset.
This commit is contained in:
Andrew R. Reiter 2001-11-21 20:29:08 +00:00
parent 43f5f1d6ac
commit 31689d25c8

View file

@ -243,8 +243,7 @@ vlan_clone_create(struct if_clone *ifc, int *unit)
return (EEXIST);
}
ifv = malloc(sizeof(struct ifvlan), M_VLAN, M_WAITOK);
memset(ifv, 0, sizeof(struct ifvlan));
ifv = malloc(sizeof(struct ifvlan), M_VLAN, M_WAITOK | M_ZERO);
ifp = &ifv->ifv_if;
SLIST_INIT(&ifv->vlan_mc_listhead);