diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-04-27 11:01:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-27 21:13:55 -0400 |
commit | afe0159d935ab731c682e811356914bb2be9470c (patch) | |
tree | db34bd3e0fc3289f1a92a7096e6efba2dbe81122 /net/bridge | |
parent | 83f6a740b4e52f88e312223df2fc94016a208618 (diff) |
bridge: multicast_flood cleanup
Move some declarations around to make it clearer which variables
are being used inside loop.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_forward.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index 5f9988a3f06a..396f077216a3 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -208,17 +208,15 @@ static void br_multicast_flood(struct net_bridge_mdb_entry *mdst, | |||
208 | { | 208 | { |
209 | struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; | 209 | struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; |
210 | struct net_bridge *br = netdev_priv(dev); | 210 | struct net_bridge *br = netdev_priv(dev); |
211 | struct net_bridge_port *port; | 211 | struct net_bridge_port *prev = NULL; |
212 | struct net_bridge_port *lport, *rport; | ||
213 | struct net_bridge_port *prev; | ||
214 | struct net_bridge_port_group *p; | 212 | struct net_bridge_port_group *p; |
215 | struct hlist_node *rp; | 213 | struct hlist_node *rp; |
216 | 214 | ||
217 | prev = NULL; | ||
218 | |||
219 | rp = rcu_dereference(br->router_list.first); | 215 | rp = rcu_dereference(br->router_list.first); |
220 | p = mdst ? rcu_dereference(mdst->ports) : NULL; | 216 | p = mdst ? rcu_dereference(mdst->ports) : NULL; |
221 | while (p || rp) { | 217 | while (p || rp) { |
218 | struct net_bridge_port *port, *lport, *rport; | ||
219 | |||
222 | lport = p ? p->port : NULL; | 220 | lport = p ? p->port : NULL; |
223 | rport = rp ? hlist_entry(rp, struct net_bridge_port, rlist) : | 221 | rport = rp ? hlist_entry(rp, struct net_bridge_port, rlist) : |
224 | NULL; | 222 | NULL; |