summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_bridge.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-10-23 20:26:15 +0000
committerdes <des@FreeBSD.org>2008-10-23 20:26:15 +0000
commita1e1ad22e07d384a9609e60cdf00daf7cac902cf (patch)
tree8c9f9efa0a9f52794e2ce1fe47128f50d30f8c28 /sys/netgraph/ng_bridge.c
parent0b81365bc66eb70b9d9b1466012b41f8ccdec19a (diff)
downloadFreeBSD-src-a1e1ad22e07d384a9609e60cdf00daf7cac902cf.zip
FreeBSD-src-a1e1ad22e07d384a9609e60cdf00daf7cac902cf.tar.gz
Fix a number of style issues in the MALLOC / FREE commit. I've tried to
be careful not to fix anything that was already broken; the NFSv4 code is particularly bad in this respect.
Diffstat (limited to 'sys/netgraph/ng_bridge.c')
-rw-r--r--sys/netgraph/ng_bridge.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index da48f23..c033a55 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -304,7 +304,8 @@ ng_bridge_constructor(node_p node)
ng_callout_init(&priv->timer);
/* Allocate and initialize hash table, etc. */
- priv->tab = malloc( MIN_BUCKETS * sizeof(*priv->tab), M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
+ priv->tab = malloc(MIN_BUCKETS * sizeof(*priv->tab),
+ M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
if (priv->tab == NULL) {
free(priv, M_NETGRAPH_BRIDGE);
return (ENOMEM);
@@ -358,7 +359,8 @@ ng_bridge_newhook(node_p node, hook_p hook, const char *name)
return (EINVAL);
if (priv->links[linkNum] != NULL)
return (EISCONN);
- priv->links[linkNum] = malloc( sizeof(*priv->links[linkNum]), M_NETGRAPH_BRIDGE, M_NOWAIT|M_ZERO);
+ priv->links[linkNum] = malloc(sizeof(*priv->links[linkNum]),
+ M_NETGRAPH_BRIDGE, M_NOWAIT|M_ZERO);
if (priv->links[linkNum] == NULL)
return (ENOMEM);
priv->links[linkNum]->hook = hook;
@@ -848,7 +850,7 @@ ng_bridge_put(priv_p priv, const u_char *addr, int linkNum)
#endif
/* Allocate and initialize new hashtable entry */
- hent = malloc( sizeof(*hent), M_NETGRAPH_BRIDGE, M_NOWAIT);
+ hent = malloc(sizeof(*hent), M_NETGRAPH_BRIDGE, M_NOWAIT);
if (hent == NULL)
return (0);
bcopy(addr, hent->host.addr, ETHER_ADDR_LEN);
@@ -892,7 +894,8 @@ ng_bridge_rehash(priv_p priv)
newMask = newNumBuckets - 1;
/* Allocate and initialize new table */
- newTab = malloc( newNumBuckets * sizeof(*newTab), M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
+ newTab = malloc(newNumBuckets * sizeof(*newTab),
+ M_NETGRAPH_BRIDGE, M_NOWAIT | M_ZERO);
if (newTab == NULL)
return;
OpenPOWER on IntegriCloud