[PATCH] security: remove redundant assignment to variable rc

Paul Moore paul at paul-moore.com
Sun Jan 5 02:52:12 UTC 2025


On Nov 12, 2024 Colin Ian King <colin.i.king at gmail.com> wrote:
> 
> In the case where rc is equal to EOPNOTSUPP it is being reassigned a
> new value of zero that is never read. The following continue statement
> loops back to the next iteration of the lsm_for_each_hook loop and
> rc is being re-assigned a new value from the call to getselfattr.
> The assignment is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king at gmail.com>
> Reviewed-by: Serge Hallyn <serge at hallyn.com>
> ---
>  security/security.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Merged to lsm/dev, thanks.

--
paul-moore.com



More information about the Linux-security-module-archive mailing list