lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091005145205.GE7035@psychotron.lab.eng.brq.redhat.com>
Date:	Mon, 5 Oct 2009 16:52:05 +0200
From:	Jiri Pirko <jpirko@...hat.com>
To:	Nicolas de Pesloüan <nicolas.2p.debian@...e.fr>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	Jay Vosburgh <fubar@...ibm.com>,
	bonding-devel@...ts.sourceforge.net
Subject: Re: [PATCH net-next-2.6] bonding: remove useless assignment

Sun, Sep 20, 2009 at 08:19:46PM CEST, nicolas.2p.debian@...e.fr wrote:
> 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.

Correct.

>
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@...e.fr>

Reviewed-by: Jiri Pirko <jpirko@...hat.com>

>
> ---
>
> 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 */
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ