Commit d8fb1648 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

bridge: use hlist_entry_safe



Use hlist_entry_safe() instead of open-coding it.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1e3ac201
...@@ -274,8 +274,7 @@ void br_multicast_flood(struct net_bridge_mdb_entry *mdst, ...@@ -274,8 +274,7 @@ void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
struct net_bridge_port *port, *lport, *rport; struct net_bridge_port *port, *lport, *rport;
lport = p ? p->port : NULL; lport = p ? p->port : NULL;
rport = rp ? hlist_entry(rp, struct net_bridge_port, rlist) : rport = hlist_entry_safe(rp, struct net_bridge_port, rlist);
NULL;
if ((unsigned long)lport > (unsigned long)rport) { if ((unsigned long)lport > (unsigned long)rport) {
port = lport; port = lport;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment