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

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

Link: https://lore.kernel.org/20261013072108.4407-3-blum@kernel.org
Signed-off-by: Thorsten Blum <blum@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Thorsten Blum 2026-10-13 09:21:10 +02:00 committed by Andrew Morton
parent e062baf568
commit e60b8f7a1d

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;