1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-03 17:11:32 +00:00

- 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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86749

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);