tty: use isdigit() in tty_find_polling_driver()
PATCH 1/1 tty: use isdigit() in tty_find_polling_driver()
Use isdigit() to replace the open-coded implementation.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/tty_io.c +1 -1
@@ -383,7 +383,7 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)char *str, *stp;for (str = name; *str; str++) -if ((*str >='0' && *str <='9' ) || *str ==',' ) +if (isdigit (*str) || *str ==',' )break ;if (!*str)return NULL ;
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 3 lines
Use
isdigit()to replace the open-coded implementation.Signed-off-by Thorsten Blum <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1