Re: [PATCH] ipv6: remove redundant store to value after addition

From: David Ahern
Date: Tue Jun 28 2022 - 11:04:53 EST


On 6/28/22 8:54 AM, Colin Ian King wrote:
> There is no need to store the result of the addition back to variable count
> after the addition. The store is redundant, replace += with just +
>
> Cleans up clang scan build warning:
> warning: Although the value stored to 'count' is used in the enclosing
> expression, the value is never actually read from 'count'
>
> Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
> ---
> net/ipv6/route.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>