* [PATCH] bpf: Use isdigit() in bpf_bprintf_prepare()
@ 2026-11-21 0:53 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-11-21 0:53 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Eduard Zingerman, Kumar Kartikeya Dwivedi, Martin KaFai Lau,
Song Liu, Yonghong Song, Jiri Olsa, Emil Tsalapatis,
Ihor Solodrai
Cc: Thorsten Blum, bpf
Use isdigit() to replace the open-coded implementation.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
kernel/bpf/helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index 6788489a2608..7292a15ffbb2 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -927,7 +927,7 @@ int bpf_bprintf_prepare(const char *fmt, u32 fmt_size, const u64 *raw_args,
i++;
if (fmt[i] >= '1' && fmt[i] <= '9') {
i++;
- while (fmt[i] >= '0' && fmt[i] <= '9')
+ while (isdigit(fmt[i]))
i++;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-21 0:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 0:53 [PATCH] bpf: Use isdigit() in bpf_bprintf_prepare() Thorsten Blum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.