* [PATCH] audit: Use str_yes_no() helper function
@ 2024-10-18 11:09 Thorsten Blum
2024-10-22 23:16 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-10-18 11:09 UTC (permalink / raw)
To: Paul Moore, Eric Paris; +Cc: Thorsten Blum, audit, linux-kernel
Remove hard-coded strings by using the helper function str_yes_no().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
kernel/auditsc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index cd57053b4a69..0627e74585ce 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -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"
@@ -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",
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] audit: Use str_yes_no() helper function
2024-10-18 11:09 [PATCH] audit: Use str_yes_no() helper function Thorsten Blum
@ 2024-10-22 23:16 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2024-10-22 23:16 UTC (permalink / raw)
To: Thorsten Blum; +Cc: audit, linux-kernel, Eric Paris
On Oct 18, 2024 Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> Remove hard-coded strings by using the helper function str_yes_no().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> kernel/auditsc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Merged into audit/dev, thanks.
--
paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-22 23:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 11:09 [PATCH] audit: Use str_yes_no() helper function Thorsten Blum
2024-10-22 23:16 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox