Re: [PATCH][next] ipv4: remove redundant assignment to n

From: David Ahern
Date: Fri May 24 2019 - 18:08:01 EST


On 5/24/19 3:56 PM, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> The pointer n is being assigned a value however this value is
> never read in the code block and the end of the code block
> continues to the next loop iteration. Clean up the code by
> removing the redundant assignment.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> net/ipv4/fib_trie.c | 1 -
> 1 file changed, 1 deletion(-)
>

This looks right to me -- n should have been dropped. It is used in
fib_trie_free from which I created __fib_info_notify_update but
__fib_info_notify_update does do the put_child_root or node_free, it
only walks the tree looking for relevant entries that need to send the
NEWROUTE notifications.

Fixes: 1bff1a0c9bbda ("ipv4: Add function to send route updates")
Reviewed-by: David Ahern <dsahern@xxxxxxxxx>