diff options
author | arr <arr@FreeBSD.org> | 2001-11-21 20:29:08 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2001-11-21 20:29:08 +0000 |
commit | 4c42957ee298680f5261d3178faa7fd90d9963ac (patch) | |
tree | af9a9905d03ea4a182cfda37da570d4b8adf83ff /sys/net | |
parent | ef456f005bae800792333b53f82294f7c57f7255 (diff) | |
download | FreeBSD-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.c | 3 |
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); |