aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_bridge.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-12 21:58:59 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-04-12 21:58:59 +0000
commit6d5f002ed1187547b0b40f8b46a3db38bf89c6dc (patch)
tree0842ac970d1c94b4b3c63481c3656134d40e9e64 /sys/netgraph/ng_bridge.c
parentfa351643f5860f251141bcf0d86fb55a33dc5f96 (diff)
downloadsrc-6d5f002ed1187547b0b40f8b46a3db38bf89c6dc.tar.gz
src-6d5f002ed1187547b0b40f8b46a3db38bf89c6dc.zip
netgraph: Remove the rethook parameter from NG_NODE_FOREACH_HOOK.
This parameter was set to the hook that terminated the iteration early. However, none of the remaining callers used this argument and it was always set to an otherwise-unused variable.
Diffstat (limited to 'sys/netgraph/ng_bridge.c')
-rw-r--r--sys/netgraph/ng_bridge.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index 9f1d33ba4c85..14068878736d 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -532,14 +532,11 @@ ng_bridge_rcvmsg(node_p node, item_p item, hook_p lasthook)
}
case NGM_BRIDGE_RESET:
{
- hook_p rethook;
-
/* Flush all entries in the hash table */
ng_bridge_remove_hosts(priv, NULL);
/* Reset all loop detection counters and stats */
- NG_NODE_FOREACH_HOOK(node, ng_bridge_reset_link, NULL,
- rethook);
+ NG_NODE_FOREACH_HOOK(node, ng_bridge_reset_link, NULL);
break;
}
case NGM_BRIDGE_GET_STATS:
@@ -777,7 +774,6 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
struct ng_bridge_host *host;
struct ether_header *eh;
struct ng_bridge_send_ctx ctx = { 0 };
- hook_p ret;
NGI_GET_M(item, ctx.m);
@@ -896,7 +892,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
}
/* Distribute unknown, multicast, broadcast pkts to all other links */
- NG_NODE_FOREACH_HOOK(node, ng_bridge_send_ctx, &ctx, ret);
+ NG_NODE_FOREACH_HOOK(node, ng_bridge_send_ctx, &ctx);
/* Finally send out on the first link found */
if (ctx.foundFirst != NULL) {
@@ -1168,7 +1164,6 @@ ng_bridge_timeout(node_p node, hook_p hook, void *arg1, int arg2)
const priv_p priv = NG_NODE_PRIVATE(node);
int bucket;
int counter = 0;
- hook_p ret;
/* Update host time counters and remove stale entries */
for (bucket = 0; bucket < priv->numBuckets; bucket++) {
@@ -1198,7 +1193,7 @@ ng_bridge_timeout(node_p node, hook_p hook, void *arg1, int arg2)
/* Decrease loop counter on muted looped back links */
counter = 0;
- NG_NODE_FOREACH_HOOK(node, ng_bridge_unmute, &counter, ret);
+ NG_NODE_FOREACH_HOOK(node, ng_bridge_unmute, &counter);
KASSERT(priv->numLinks == counter,
("%s: links: %d != %d", __func__, priv->numLinks, counter));