audit: fix some horrible switch statement style crimes

Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Paul Moore 2016-06-16 17:08:19 -04:00
parent 2b4c7afe79
commit 66b12abc84
2 changed files with 12 additions and 4 deletions

View File

@ -1343,8 +1343,12 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type,
return result; return result;
} }
switch (rule->action) { switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break; case AUDIT_NEVER:
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; *state = AUDIT_DISABLED;
break;
case AUDIT_ALWAYS:
*state = AUDIT_RECORD_CONTEXT;
break;
} }
return 1; return 1;
} }

View File

@ -695,8 +695,12 @@ static int audit_filter_rules(struct task_struct *tsk,
ctx->prio = rule->prio; ctx->prio = rule->prio;
} }
switch (rule->action) { switch (rule->action) {
case AUDIT_NEVER: *state = AUDIT_DISABLED; break; case AUDIT_NEVER:
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; *state = AUDIT_DISABLED;
break;
case AUDIT_ALWAYS:
*state = AUDIT_RECORD_CONTEXT;
break;
} }
return 1; return 1;
} }