Skip to content

Commit

Permalink
apparmor: remove unused redundant variable stop
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: John Johansen <[email protected]>
  • Loading branch information
Colin Ian King authored and John Johansen committed Nov 21, 2017
1 parent 954317f commit e3bcfc1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions security/apparmor/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;

Expand Down

0 comments on commit e3bcfc1

Please sign in to comment.