Skip to content

Commit 89282be

Browse files
tobluxpcmoore
authored andcommitted
audit: Use str_yes_no() helper function
Remove hard-coded strings by using the helper function str_yes_no(). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent 2132b35 commit 89282be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/auditsc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,8 @@ static void audit_log_uring(struct audit_context *ctx)
16531653
audit_log_format(ab, "uring_op=%d", ctx->uring_op);
16541654
if (ctx->return_valid != AUDITSC_INVALID)
16551655
audit_log_format(ab, " success=%s exit=%ld",
1656-
(ctx->return_valid == AUDITSC_SUCCESS ?
1657-
"yes" : "no"),
1656+
str_yes_no(ctx->return_valid ==
1657+
AUDITSC_SUCCESS),
16581658
ctx->return_code);
16591659
audit_log_format(ab,
16601660
" items=%d"
@@ -1696,8 +1696,8 @@ static void audit_log_exit(void)
16961696
audit_log_format(ab, " per=%lx", context->personality);
16971697
if (context->return_valid != AUDITSC_INVALID)
16981698
audit_log_format(ab, " success=%s exit=%ld",
1699-
(context->return_valid == AUDITSC_SUCCESS ?
1700-
"yes" : "no"),
1699+
str_yes_no(context->return_valid ==
1700+
AUDITSC_SUCCESS),
17011701
context->return_code);
17021702
audit_log_format(ab,
17031703
" a0=%lx a1=%lx a2=%lx a3=%lx items=%d",

0 commit comments

Comments
 (0)