Re: [PATCH] inet: Avoid unitialized variable warning in inet_unhash()

From: David Miller
Date: Thu Feb 01 2018 - 09:50:47 EST


From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date: Thu, 1 Feb 2018 11:26:23 +0100

> With gcc-4.1.2:
>
> net/ipv4/inet_hashtables.c: In function ʽinet_unhashʼ:
> net/ipv4/inet_hashtables.c:628: warning: ʽilbʼ may be used uninitialized in this function
>
> While this is a false positive, it can easily be avoided by using the
> pointer itself as the canary variable.
>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

This frankly also makes the logic simpler and doesn't increase register
pressure, I like it.

Applied, thanks.