Hi,
> It's a pointer dereference assignment,
Sorry, I was wrong here !

> What automated tool showed this as useless to you?
> Please correct it's logic so it doesn't mark real side effects like
> this as superfluous.

I am not using any automated tool, only my eyes. And I
missed the intention here. It could be implemnted differently
but since it not marked as superfluous anywhere I suggest
to leave it as it is.

Sorry,

Regards,
Rami Rosen





On Jan 2, 2008 7:20 AM, David Miller <[EMAIL PROTECTED]> wrote:
> From: "Rami Rosen" <[EMAIL PROTECTED]>
> Date: Tue, 1 Jan 2008 12:48:14 +0200
>
> > These following two commands in br_nf_forward_arp() achieve nothing and
> > should be removed; the d variable is not used later in this method:
> >
> >       ...
> >       struct net_device **d = (struct net_device **)(skb->cb);
> >       ...
> >       *d = (struct net_device *)in;
> >       ...
> >
> > Signed-off-by: Rami Rosen <[EMAIL PROTECTED]>
>
> It's a pointer dereference assignment, this last line has a
> side effect, therefore you can't remove it.
>
> The code is equivalent to:
>
> struct skb_bridge_info {
>         struct net_device *dev;
> };
>
>         struct skb_bridge_info *d;
>
>         d = (struct skb_bridge_info *) skb->cb;
>
>         d->dev = in;
>
> What automated tool showed this as useless to you?
>
> Please correct it's logic so it doesn't mark real side effects like
> this as superfluous.
>
> Thanks.
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to