lib: kstrtox: Use isdigit() in _parse_integer_limit()
PATCH 1/1 lib: kstrtox: Use isdigit() in _parse_integer_limit()
Use isdigit() to replace the open-coded implementation.
Signed-off-by Thorsten Blum <[email protected]>
--- lib/kstrtox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/kstrtox.c +1 -1
@@ -69,7 +69,7 @@ unsigned int _parse_integer_limit(const char *s, unsigned int base, unsigned lonunsigned 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 ;