summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_message.h
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-11-18 15:17:43 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-11-18 15:17:43 +0000
commit918549eb3151450239d659ae968cb9e68b863bfc (patch)
tree5e63335d7dfc31ef8cf13f89356a8b83776cef7e /sys/netgraph/ng_message.h
parentf96d89a937a5b22a14182cb1b88b68dc430ee718 (diff)
downloadFreeBSD-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_message.h')
-rw-r--r--sys/netgraph/ng_message.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h
index b84a6f7..6b1b139 100644
--- a/sys/netgraph/ng_message.h
+++ b/sys/netgraph/ng_message.h
@@ -292,10 +292,9 @@ struct typelist {
#define NG_MKMESSAGE(msg, cookie, cmdid, len, how) \
do { \
MALLOC((msg), struct ng_mesg *, sizeof(struct ng_mesg) \
- + (len), M_NETGRAPH, (how)); \
+ + (len), M_NETGRAPH, (how) | M_ZERO); \
if ((msg) == NULL) \
break; \
- bzero((msg), sizeof(struct ng_mesg) + (len)); \
(msg)->header.version = NG_VERSION; \
(msg)->header.typecookie = (cookie); \
(msg)->header.cmd = (cmdid); \
@@ -311,10 +310,9 @@ struct typelist {
#define NG_MKRESPONSE(rsp, msg, len, how) \
do { \
MALLOC((rsp), struct ng_mesg *, sizeof(struct ng_mesg) \
- + (len), M_NETGRAPH, (how)); \
+ + (len), M_NETGRAPH, (how) | M_ZERO); \
if ((rsp) == NULL) \
break; \
- bzero((rsp), sizeof(struct ng_mesg) + (len)); \
(rsp)->header.version = NG_VERSION; \
(rsp)->header.arglen = (len); \
(rsp)->header.token = (msg)->header.token; \
OpenPOWER on IntegriCloud