lkml.org 
[lkml]   [2021]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] selinux: remove duplicated initialization of 'i' for clean-up
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

\
 
 \ /
  Last update: 2021-08-24 16:49    [W:0.094 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site