summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2001-11-21 20:29:08 +0000
committerarr <arr@FreeBSD.org>2001-11-21 20:29:08 +0000
commit4c42957ee298680f5261d3178faa7fd90d9963ac (patch)
treeaf9a9905d03ea4a182cfda37da570d4b8adf83ff /sys/net
parentef456f005bae800792333b53f82294f7c57f7255 (diff)
downloadFreeBSD-src-4c42957ee298680f5261d3178faa7fd90d9963ac.zip
FreeBSD-src-4c42957ee298680f5261d3178faa7fd90d9963ac.tar.gz
- Utilize the great M_ZERO flag rather than allocating memory then do
a call to memset.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_vlan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 3098215..8512752 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);
OpenPOWER on IntegriCloud