Skip to content

Commit d0d3c00

Browse files
committed
audit: Use str_yes_no() helper function
JIRA: https://issues.redhat.com/browse/RHEL-78967 This patch is a backport of the following upstream commit: commit 89282be Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Fri Oct 18 13:09:46 2024 +0200 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> Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
1 parent 2a19ddd commit d0d3c00

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/auditsc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,8 +1657,8 @@ static void audit_log_uring(struct audit_context *ctx)
16571657
audit_log_format(ab, "uring_op=%d", ctx->uring_op);
16581658
if (ctx->return_valid != AUDITSC_INVALID)
16591659
audit_log_format(ab, " success=%s exit=%ld",
1660-
(ctx->return_valid == AUDITSC_SUCCESS ?
1661-
"yes" : "no"),
1660+
str_yes_no(ctx->return_valid ==
1661+
AUDITSC_SUCCESS),
16621662
ctx->return_code);
16631663
audit_log_format(ab,
16641664
" items=%d"
@@ -1700,8 +1700,8 @@ static void audit_log_exit(void)
17001700
audit_log_format(ab, " per=%lx", context->personality);
17011701
if (context->return_valid != AUDITSC_INVALID)
17021702
audit_log_format(ab, " success=%s exit=%ld",
1703-
(context->return_valid == AUDITSC_SUCCESS ?
1704-
"yes" : "no"),
1703+
str_yes_no(context->return_valid ==
1704+
AUDITSC_SUCCESS),
17051705
context->return_code);
17061706
audit_log_format(ab,
17071707
" a0=%lx a1=%lx a2=%lx a3=%lx items=%d",

0 commit comments

Comments
 (0)