mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
accessibility: speakup: Use isdigit() in handle_goto()
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> Link: https://patch.msgid.link/20261012130805.345080-4-blum@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
23de9e6a25
commit
97a551fa49
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user