mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: "Christian Göttsche" <cgoettsche@seltendoof.de>
Cc: "Christian Göttsche" <cgzones@googlemail.com>,
	"James Morris" <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH 2/2] lsm: rename variable to avoid shadowing
Date: Sat, 04 Jan 2025 22:04:38 -0500	[thread overview]
Message-ID: <a0d6421cd8fb725ebb627f5e22cca220@paul-moore.com> (raw)
In-Reply-To: <20241125105926.47141-1-cgoettsche@seltendoof.de>

On Nov 25, 2024 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgoettsche@seltendoof.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@googlemail.com>
> ---
>  security/lsm_audit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Merged into lsm/dev, thanks.

--
paul-moore.com

      parent reply	other threads:[~2025-01-05  3:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 10:59 Christian Göttsche
2024-11-25 10:59 ` [PATCH 1/2] lsm: constify function parameters Christian Göttsche
2025-01-05  3:04   ` Paul Moore
2025-01-05  3:04 ` Paul Moore [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0d6421cd8fb725ebb627f5e22cca220@paul-moore.com \
    --to=paul@paul-moore.com \
    --cc=cgoettsche@seltendoof.de \
    --cc=cgzones@googlemail.com \
    --cc=jmorris@namei.org \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®