Skip to content

Commit

Permalink
bonding: remove useless assignment
Browse files Browse the repository at this point in the history
The variable old_active is first set to bond->curr_active_slave.
Then, it is unconditionally set to new_active, without being used in between.

The first assignment, having no side effect, is useless.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nicolas de Pesloüan authored and David S. Miller committed Oct 7, 2009
1 parent 3c6aaa2 commit 49b4ad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
int mintime = bond->params.updelay;
int i;

new_active = old_active = bond->curr_active_slave;
new_active = bond->curr_active_slave;

if (!new_active) { /* there were no active slaves left */
if (bond->slave_cnt > 0) /* found one slave */
Expand Down

0 comments on commit 49b4ad9

Please sign in to comment.