diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-11-18 15:17:43 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-11-18 15:17:43 +0000 |
commit | 918549eb3151450239d659ae968cb9e68b863bfc (patch) | |
tree | 5e63335d7dfc31ef8cf13f89356a8b83776cef7e /sys/netgraph/ng_base.c | |
parent | f96d89a937a5b22a14182cb1b88b68dc430ee718 (diff) | |
download | FreeBSD-src-918549eb3151450239d659ae968cb9e68b863bfc.zip FreeBSD-src-918549eb3151450239d659ae968cb9e68b863bfc.tar.gz |
Add the use of M_ZERO to netgraph.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Submitted by: archie
Approved by: archie
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r-- | sys/netgraph/ng_base.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index d6d4924..b0bfbbf 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -355,12 +355,11 @@ ng_make_node_common(struct ng_type *type, node_p *nodepp) } /* Make a node and try attach it to the type */ - MALLOC(node, node_p, sizeof(*node), M_NETGRAPH, M_NOWAIT); + MALLOC(node, node_p, sizeof(*node), M_NETGRAPH, M_NOWAIT | M_ZERO); if (node == NULL) { TRAP_ERROR; return (ENOMEM); } - bzero(node, sizeof(*node)); node->type = type; node->refs++; /* note reference */ type->refs++; @@ -674,12 +673,11 @@ ng_add_hook(node_p node, const char *name, hook_p *hookp) } /* Allocate the hook and link it up */ - MALLOC(hook, hook_p, sizeof(*hook), M_NETGRAPH, M_NOWAIT); + MALLOC(hook, hook_p, sizeof(*hook), M_NETGRAPH, M_NOWAIT | M_ZERO); if (hook == NULL) { TRAP_ERROR; return (ENOMEM); } - bzero(hook, sizeof(*hook)); hook->refs = 1; hook->flags = HK_INVALID; hook->node = node; |