diff options
author | ae <ae@FreeBSD.org> | 2011-04-18 09:10:27 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2011-04-18 09:10:27 +0000 |
commit | 636bed78e5bc6ab20edda6b6d287c8fb8a71476f (patch) | |
tree | 74744ef2fc5f73bdb49a3778031a24d40a7d766a /sys/netgraph/ng_patch.c | |
parent | 54869edbdff39659216f7167e5c54d6c2de25896 (diff) | |
download | FreeBSD-src-636bed78e5bc6ab20edda6b6d287c8fb8a71476f.zip FreeBSD-src-636bed78e5bc6ab20edda6b6d287c8fb8a71476f.tar.gz |
Use M_WAITOK flag instead M_WAIT for malloc.
Suggested by: glebius
MFC after: 1 week
Diffstat (limited to 'sys/netgraph/ng_patch.c')
-rw-r--r-- | sys/netgraph/ng_patch.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/netgraph/ng_patch.c b/sys/netgraph/ng_patch.c index 5e1ea54..bbdd25e 100644 --- a/sys/netgraph/ng_patch.c +++ b/sys/netgraph/ng_patch.c @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item, hook_p lasthook) if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item, hook_p lasthook) if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item, hook_p lasthook) /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) |