mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
- Utilize the great M_ZERO flag rather than allocating memory then do
a call to memset.
This commit is contained in:
parent
43f5f1d6ac
commit
31689d25c8
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue