Skip to content

Commit 66b12ab

Browse files
committed
audit: fix some horrible switch statement style crimes
Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 2b4c7af commit 66b12ab

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎kernel/auditfilter.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,12 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type,
13431343
return result;
13441344
}
13451345
switch (rule->action) {
1346-
case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
1347-
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
1346+
case AUDIT_NEVER:
1347+
*state = AUDIT_DISABLED;
1348+
break;
1349+
case AUDIT_ALWAYS:
1350+
*state = AUDIT_RECORD_CONTEXT;
1351+
break;
13481352
}
13491353
return 1;
13501354
}

‎kernel/auditsc.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,12 @@ static int audit_filter_rules(struct task_struct *tsk,
695695
ctx->prio = rule->prio;
696696
}
697697
switch (rule->action) {
698-
case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
699-
case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
698+
case AUDIT_NEVER:
699+
*state = AUDIT_DISABLED;
700+
break;
701+
case AUDIT_ALWAYS:
702+
*state = AUDIT_RECORD_CONTEXT;
703+
break;
700704
}
701705
return 1;
702706
}

0 commit comments

Comments
 (0)