* [PATCH] accessibility: speakup: Use isdigit() in handle_goto()
@ 2026-10-12 13:08 Thorsten Blum
2026-10-12 13:56 ` Samuel Thibault
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-10-12 13:08 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, Haoxiang Li, Kees Cook, Jagadeesh Yalapalli
Cc: Thorsten Blum, speakup, linux-kernel
Use isdigit() to replace the open-coded implementation.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
drivers/accessibility/speakup/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c
index e9b7c2761f6f..a7c14531f2ce 100644
--- a/drivers/accessibility/speakup/main.c
+++ b/drivers/accessibility/speakup/main.c
@@ -1980,7 +1980,7 @@ static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u16 key)
maxlen = (*goto_buf >= '0') ? 3 : 4;
if ((ch == '+' || ch == '-') && num == 1)
return 1;
- if (ch >= '0' && ch <= '9' && num < maxlen)
+ if (isdigit(ch) && num < maxlen)
return 1;
if (num < maxlen - 1 || num > maxlen)
goto oops;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] accessibility: speakup: Use isdigit() in handle_goto()
2026-10-12 13:08 [PATCH] accessibility: speakup: Use isdigit() in handle_goto() Thorsten Blum
@ 2026-10-12 13:56 ` Samuel Thibault
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2026-10-12 13:56 UTC (permalink / raw)
To: Thorsten Blum
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Greg Kroah-Hartman,
Haoxiang Li, Kees Cook, Jagadeesh Yalapalli, speakup,
linux-kernel
Thorsten Blum, le lun. 12 oct. 2026 15:08:05 +0200, a ecrit:
> Use isdigit() to replace the open-coded implementation.
>
> Signed-off-by: Thorsten Blum <blum@kernel.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Thanks!
> ---
> drivers/accessibility/speakup/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c
> index e9b7c2761f6f..a7c14531f2ce 100644
> --- a/drivers/accessibility/speakup/main.c
> +++ b/drivers/accessibility/speakup/main.c
> @@ -1980,7 +1980,7 @@ static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u16 key)
> maxlen = (*goto_buf >= '0') ? 3 : 4;
> if ((ch == '+' || ch == '-') && num == 1)
> return 1;
> - if (ch >= '0' && ch <= '9' && num < maxlen)
> + if (isdigit(ch) && num < maxlen)
> return 1;
> if (num < maxlen - 1 || num > maxlen)
> goto oops;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-12 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-12 13:08 [PATCH] accessibility: speakup: Use isdigit() in handle_goto() Thorsten Blum
2026-10-12 13:56 ` Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®