Re: [PATCH v2] kernel/sysctl.c: drop unneeded assignment in proc_do_large_bitmap()

From: Kees Cook
Date: Wed Oct 07 2020 - 14:44:11 EST


On Wed, Oct 07, 2020 at 04:19:04PM +0100, Sudip Mukherjee wrote:
> The variable 'first' is assigned 0 inside the while loop in the if block
> but it is not used in the if block and is only used in the else block.
> So, remove the unneeded assignment and move the variable in the else block.
>
> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook