diff options
author | Jay Vosburgh <fubar@us.ibm.com> | 2008-03-22 06:29:34 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-26 04:15:40 +0100 |
commit | 966bc6f434df4a02108d01dda8cd52951fe853da (patch) | |
tree | eb0a8e20b80475e22b4c5038a9bc246fda5fc605 /drivers/net/bonding/bond_alb.c | |
parent | bonding: Fix locking in 802.3ad mode (diff) | |
download | linux-966bc6f434df4a02108d01dda8cd52951fe853da.tar.xz linux-966bc6f434df4a02108d01dda8cd52951fe853da.zip |
bonding: fix two compiler warnings
Fix two compiler warnings that are new with recent versions of gcc
(apparently 4.2 and up). One is fixed by refactoring; this change was
supplied by Stephen Hemminger. The other was fixed by labelling the
variable as uninitialized_var() after confirming via inspection that it
cannot actually be used uninitialized.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index b57bc9467dbe..3f58c3d0b710 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -678,12 +678,8 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon } if (!list_empty(&bond->vlan_list)) { - unsigned short vlan_id; - int res = vlan_get_tag(skb, &vlan_id); - if (!res) { + if (!vlan_get_tag(skb, &client_info->vlan_id)) client_info->tag = 1; - client_info->vlan_id = vlan_id; - } } if (!client_info->assigned) { |