Skip to content

Commit

Permalink
audit: Use str_yes_no() helper function
Browse files Browse the repository at this point in the history
Remove hard-coded strings by using the helper function str_yes_no().

Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
toblux authored and pcmoore committed Oct 22, 2024
1 parent 2132b35 commit 89282be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,8 +1653,8 @@ static void audit_log_uring(struct audit_context *ctx)
audit_log_format(ab, "uring_op=%d", ctx->uring_op);
if (ctx->return_valid != AUDITSC_INVALID)
audit_log_format(ab, " success=%s exit=%ld",
(ctx->return_valid == AUDITSC_SUCCESS ?
"yes" : "no"),
str_yes_no(ctx->return_valid ==
AUDITSC_SUCCESS),
ctx->return_code);
audit_log_format(ab,
" items=%d"
Expand Down Expand Up @@ -1696,8 +1696,8 @@ static void audit_log_exit(void)
audit_log_format(ab, " per=%lx", context->personality);
if (context->return_valid != AUDITSC_INVALID)
audit_log_format(ab, " success=%s exit=%ld",
(context->return_valid == AUDITSC_SUCCESS ?
"yes" : "no"),
str_yes_no(context->return_valid ==
AUDITSC_SUCCESS),
context->return_code);
audit_log_format(ab,
" a0=%lx a1=%lx a2=%lx a3=%lx items=%d",
Expand Down

0 comments on commit 89282be

Please sign in to comment.