]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: Fix shadowed local variable in unpack_trans_table()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 6 Jul 2017 08:56:21 +0000 (10:56 +0200)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 22 Sep 2017 20:00:57 +0000 (13:00 -0700)
commita039bbc451ec64a4eecbb89e11bda5437e21848a
treed298f500677bf80698bc5b75832bb556018fdf84
parent830c16efd3192a0556bd429931b332b008dc72b7
apparmor: Fix shadowed local variable in unpack_trans_table()

with W=2:

    security/apparmor/policy_unpack.c: In function ‘unpack_trans_table’:
    security/apparmor/policy_unpack.c:469: warning: declaration of ‘pos’ shadows a previous local
    security/apparmor/policy_unpack.c:451: warning: shadowed declaration is here

Rename the old "pos" to "saved_pos" to fix this.

Fixes: e1d43024c6cf1070 ("apparmor: support v7 transition format compatible with label_parse")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy_unpack.c