lib: kstrtox: use isdigit() in _parse_integer_limit()

Use isdigit() to replace the open-coded implementation.

Link: https://lore.kernel.org/[email protected]
Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
This commit is contained in:
Thorsten Blum
2026-10-20 22:29:54 -07:00
committed by Andrew Morton
parent e062baf568
commit e60b8f7a1d
+1 -1
View File
@@ -69,7 +69,7 @@ unsigned int _parse_integer_limit(const char *s, unsigned int base, unsigned lon
unsigned int lc = _tolower(c);
unsigned int val;
if ('0' <= c && c <= '9')
if (isdigit(c))
val = c - '0';
else if ('a' <= lc && lc <= 'f')
val = lc - 'a' + 10;