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/ng_sppp.c | |
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/ng_sppp.c')
-rw-r--r-- | sys/netgraph/ng_sppp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netgraph/ng_sppp.c b/sys/netgraph/ng_sppp.c index 988de2e..5276f4f 100644 --- a/sys/netgraph/ng_sppp.c +++ b/sys/netgraph/ng_sppp.c @@ -121,8 +121,8 @@ ng_sppp_get_unit (int *unit) int newlen; newlen = (2 * ng_sppp_units_len) + sizeof (*ng_sppp_units); - MALLOC (newarray, unsigned char *, - newlen * sizeof (*ng_sppp_units), M_NETGRAPH_SPPP, M_NOWAIT); + newarray = malloc (newlen * sizeof (*ng_sppp_units), + M_NETGRAPH_SPPP, M_NOWAIT); if (newarray == NULL) return (ENOMEM); bcopy (ng_sppp_units, newarray, @@ -130,7 +130,7 @@ ng_sppp_get_unit (int *unit) bzero (newarray + ng_sppp_units_len, newlen - ng_sppp_units_len); if (ng_sppp_units != NULL) - FREE (ng_sppp_units, M_NETGRAPH_SPPP); + free (ng_sppp_units, M_NETGRAPH_SPPP); ng_sppp_units = newarray; ng_sppp_units_len = newlen; } @@ -163,7 +163,7 @@ ng_sppp_free_unit (int unit) ng_units_in_use--; if (ng_units_in_use == 0) { - FREE (ng_sppp_units, M_NETGRAPH_SPPP); + free (ng_sppp_units, M_NETGRAPH_SPPP); ng_sppp_units_len = 0; ng_sppp_units = NULL; } @@ -248,13 +248,13 @@ ng_sppp_constructor (node_p node) int error = 0; /* Allocate node and interface private structures */ - MALLOC (priv, priv_p, sizeof(*priv), M_NETGRAPH_SPPP, M_NOWAIT|M_ZERO); + priv = malloc (sizeof(*priv), M_NETGRAPH_SPPP, M_NOWAIT|M_ZERO); if (priv == NULL) return (ENOMEM); ifp = if_alloc(IFT_PPP); if (ifp == NULL) { - FREE (priv, M_NETGRAPH_SPPP); + free (priv, M_NETGRAPH_SPPP); return (ENOSPC); } pp = IFP2SP(ifp); @@ -265,8 +265,8 @@ ng_sppp_constructor (node_p node) /* Get an interface unit number */ if ((error = ng_sppp_get_unit(&priv->unit)) != 0) { - FREE (pp, M_NETGRAPH_SPPP); - FREE (priv, M_NETGRAPH_SPPP); + free (pp, M_NETGRAPH_SPPP); + free (priv, M_NETGRAPH_SPPP); return (error); } @@ -401,7 +401,7 @@ ng_sppp_shutdown (node_p node) if_detach (priv->ifp); if_free(priv->ifp); ng_sppp_free_unit (priv->unit); - FREE (priv, M_NETGRAPH_SPPP); + free (priv, M_NETGRAPH_SPPP); NG_NODE_SET_PRIVATE (node, NULL); NG_NODE_UNREF (node); return (0); |