diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-05-17 21:10:11 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-22 06:34:25 -0400 |
commit | 8047637c70e4451e2ac1c17ed9a91a2f753daae7 (patch) | |
tree | 8119a215591c62175bc82dab5438d57790f0c14e /drivers/net/bonding/bond_main.c | |
parent | 0883beca7f39ab0c6447af35080e5caaa07418e3 (diff) | |
download | blackbird-op-linux-8047637c70e4451e2ac1c17ed9a91a2f753daae7.tar.gz blackbird-op-linux-8047637c70e4451e2ac1c17ed9a91a2f753daae7.zip |
bonding: Remove unneeded list_empty checks.
Some places iterate over the checked list right after the check
itself, so even if the list is empty, the list_for_each_xxx
iterator will make everything right by himself.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5e3b942fb515..2a0039f19377 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -2433,9 +2433,6 @@ static int bond_has_this_ip(struct bonding *bond, __be32 ip) if (ip == bond->master_ip) return 1; - if (list_empty(&bond->vlan_list)) - return 0; - list_for_each_entry(vlan, &bond->vlan_list, vlan_list) { if (ip == vlan->vlan_ip) return 1; @@ -3495,9 +3492,6 @@ static int bond_inetaddr_event(struct notifier_block *this, unsigned long event, } } - if (list_empty(&bond->vlan_list)) - continue; - list_for_each_entry(vlan, &bond->vlan_list, vlan_list) { vlan_dev = vlan_group_get_device(bond->vlgrp, vlan->vlan_id); if (vlan_dev == event_dev) { |