Re: [PATCH] net: ipv6: mcast: Removing invalid check

From: Nicolas Kaiser
Date: Sat May 14 2011 - 10:19:10 EST


* Maxin B John <maxin.john@xxxxxxxxx>:
> Since the variable 'first' is assigned to 1, the check
> "if (truncate && !first)" will always be false.
>
> Thanks to Coverity for spotting this issue.
>
> Signed-off-by: Maxin B. John <maxin.john@xxxxxxxxx>
> ---

I don't see that. We are within a 'for' loop, and some lines
below you will find an assignment of 'first = 0;'.

Best regards,
Nicolas Kaiser

> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
> index 76b8937..441c1a4 100644
> --- a/net/ipv6/mcast.c
> +++ b/net/ipv6/mcast.c
> @@ -1536,8 +1536,6 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
>
> if (AVAILABLE(skb) < sizeof(*psrc) +
> first*sizeof(struct mld2_grec)) {
> - if (truncate && !first)
> - break; /* truncate these */
> if (pgr)
> pgr->grec_nsrcs = htons(scount);
> if (skb)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/