[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a0d6421cd8fb725ebb627f5e22cca220@paul-moore.com>
Date: Sat, 04 Jan 2025 22:04:38 -0500
From: Paul Moore <paul@...l-moore.com>
To: Christian Göttsche <cgoettsche@...tendoof.de>
Cc: Christian Göttsche <cgzones@...glemail.com>, James Morris <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>, Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>, linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 2/2] lsm: rename variable to avoid shadowing
On Nov 25, 2024 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgoettsche@...tendoof.de> wrote:
>
> The function dump_common_audit_data() contains two variables with the
> name comm: one declared at the top and one nested one.
> Rename the nested variable to improve readability and make future refactorings
> of the function less error prone.
>
> Reported by clang:
>
> security/lsm_audit.c:302:10: error: declaration shadows a local variable [-Werror,-Wshadow]
> 302 | char comm[sizeof(tsk->comm)];
> | ^
> security/lsm_audit.c:200:7: note: previous declaration is here
> 200 | char comm[sizeof(current->comm)];
> | ^
>
> Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
> ---
> security/lsm_audit.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Merged into lsm/dev, thanks.
--
paul-moore.com
Powered by blists - more mailing lists