diff options
author | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
commit | 66f807ed8b3634dc73d9f7526c484e43f094c0ee (patch) | |
tree | 21e792ce590e1bcf9b343890605a1b4c6a9016b3 /sys/netgraph/netflow | |
parent | a779c60ce0a41cd14710a8a12cfa22955108b27a (diff) | |
download | FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.zip FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.tar.gz |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
Diffstat (limited to 'sys/netgraph/netflow')
-rw-r--r-- | sys/netgraph/netflow/netflow.c | 5 | ||||
-rw-r--r-- | sys/netgraph/netflow/ng_netflow.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index 29193ab..bf261a9 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -331,8 +331,7 @@ ng_netflow_cache_init(priv_p priv) uma_zone_set_max(priv->zone, CACHESIZE); /* Allocate hash. */ - MALLOC(priv->hash, struct flow_hash_entry *, - NBUCKETS * sizeof(struct flow_hash_entry), + priv->hash = malloc( NBUCKETS * sizeof(struct flow_hash_entry), M_NETFLOW_HASH, M_WAITOK | M_ZERO); if (priv->hash == NULL) { @@ -382,7 +381,7 @@ ng_netflow_cache_flush(priv_p priv) /* Free hash memory. */ if (priv->hash) - FREE(priv->hash, M_NETFLOW_HASH); + free(priv->hash, M_NETFLOW_HASH); mtx_destroy(&priv->export_mtx); } diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c index 76fece8..d43c976 100644 --- a/sys/netgraph/netflow/ng_netflow.c +++ b/sys/netgraph/netflow/ng_netflow.c @@ -185,7 +185,7 @@ ng_netflow_constructor(node_p node) int error = 0, i; /* Initialize private data */ - MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT); if (priv == NULL) return (ENOMEM); bzero(priv, sizeof(*priv)); @@ -708,7 +708,7 @@ ng_netflow_rmnode(node_p node) NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(priv->node); - FREE(priv, M_NETGRAPH); + free(priv, M_NETGRAPH); return (0); } |