LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Austin Kim <austindh.kim@gmail.com>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>,
Eric Paris <eparis@parisplace.org>,
selinux@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@lge.com, austin.kim@lge.com
Subject: Re: [PATCH] selinux: remove duplicated initialization of 'i' for clean-up
Date: Tue, 24 Aug 2021 10:46:31 -0400 [thread overview]
Message-ID: <CAHC9VhTgeSbRDrK-HHaZLxyR7ezFrW-0TbGRfutF1NwXVHnXWg@mail.gmail.com> (raw)
In-Reply-To: <20210824022247.GA22908@raspberrypi>
On Mon, Aug 23, 2021 at 10:22 PM Austin Kim <austindh.kim@gmail.com> wrote:
>
> From: Austin Kim <austin.kim@lge.com>
>
> The local variable 'i' is used to be incremented inside while loop
> within sidtab_convert_tree(). Before while loop, 'i' is set to 0
> inside if/else statement.
>
> Since there is no 'goto' statement within sidtab_convert_tree(),
> it had better initialize 'i' as 0 once before if/else statement.
>
> Signed-off-by: Austin Kim <austin.kim@lge.com>
> ---
> security/selinux/ss/sidtab.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Let's leave the existing code as-is for now.
--
paul moore
www.paul-moore.com
prev parent reply other threads:[~2021-08-24 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 2:22 Austin Kim
2021-08-24 11:27 ` Ondrej Mosnacek
2021-08-24 13:33 ` Austin Kim
2021-08-24 14:46 ` 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=CAHC9VhTgeSbRDrK-HHaZLxyR7ezFrW-0TbGRfutF1NwXVHnXWg@mail.gmail.com \
--to=paul@paul-moore.com \
--cc=austin.kim@lge.com \
--cc=austindh.kim@gmail.com \
--cc=eparis@parisplace.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
--subject='Re: [PATCH] selinux: remove duplicated initialization of '\''i'\'' for clean-up' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).