]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
apparmor: remove unused redundant variable stop
authorColin Ian King <colin.king@canonical.com>
Sat, 14 Oct 2017 12:14:38 +0000 (13:14 +0100)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 21 Nov 2017 10:17:13 +0000 (02:17 -0800)
The boolean variable 'stop' is being set but never read. This
is a redundant variable and can be removed.

Cleans up clang warning: Value stored to 'stop' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/lib.c

index 3d0a2bf87abdf9c258c5816b695544b7ddc4e8c1..4d5e98e49d5e06a9066f618adabe2767da45ff3c 100644 (file)
@@ -423,7 +423,6 @@ int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
                   void (*cb)(struct audit_buffer *, void *))
 {
        int type, error;
-       bool stop = false;
        u32 denied = request & (~perms->allow | perms->deny);
 
        if (likely(!denied)) {
@@ -444,8 +443,6 @@ int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
                else
                        type = AUDIT_APPARMOR_DENIED;
 
-               if (denied & perms->stop)
-                       stop = true;
                if (denied == (denied & perms->hide))
                        error = -ENOENT;