From 31689d25c8fbd6739434c38ce65b4304da9cbf40 Mon Sep 17 00:00:00 2001 From: "Andrew R. Reiter" Date: Wed, 21 Nov 2001 20:29:08 +0000 Subject: [PATCH] - Utilize the great M_ZERO flag rather than allocating memory then do a call to memset. --- sys/net/if_vlan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 309821521ee..851275227e7 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -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);