Skip to content

Commit

Permalink
audit: fix some horrible switch statement style crimes
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
Paul Moore committed Jun 16, 2016
1 parent 2b4c7af commit 66b12ab
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions kernel/auditfilter.c
Original file line number Diff line number Diff line change
@@ -1343,8 +1343,12 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type,
return result;
}
switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
case AUDIT_NEVER:
*state = AUDIT_DISABLED;
break;
case AUDIT_ALWAYS:
*state = AUDIT_RECORD_CONTEXT;
break;
}
return 1;
}
8 changes: 6 additions & 2 deletions kernel/auditsc.c
Original file line number Diff line number Diff line change
@@ -695,8 +695,12 @@ static int audit_filter_rules(struct task_struct *tsk,
ctx->prio = rule->prio;
}
switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
case AUDIT_NEVER:
*state = AUDIT_DISABLED;
break;
case AUDIT_ALWAYS:
*state = AUDIT_RECORD_CONTEXT;
break;
}
return 1;
}

0 comments on commit 66b12ab

Please sign in to comment.