Subject: [PATCH net-next-2.6] bonding: remove useless assignment

From: Nicolas de Pesloüan <[email-masked]>
Date: Wed, 07 Oct 2009 22:06:45 +0200

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 <[email-masked]>
Reviewed-by: Jiri Pirko <[email-masked]>

---

Resent after fixing tab to space corruption.

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a7e731f..fce7233 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1084,7 +1084,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 */