Message ID | 9076fa9d3d2d3b2574386f4850a45f7902f6503c.1704324320.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | kstrtox: introduce memparse_safe() | expand |
diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c index 1c8541ae3b3a..49750ef697bb 100644 --- a/arch/x86/boot/string.c +++ b/arch/x86/boot/string.c @@ -233,7 +233,7 @@ static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) { if (*base == 0) { if (s[0] == '0') { - if (_tolower(s[1]) == 'x' && isxdigit(s[2])) + if (_tolower(s[1]) == 'x') *base = 16; else *base = 8; diff --git a/lib/kstrtox.c b/lib/kstrtox.c index d586e6af5e5a..41c9a499bbf3 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c @@ -27,7 +27,7 @@ const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) { if (*base == 0) { if (s[0] == '0') { - if (_tolower(s[1]) == 'x' && isxdigit(s[2])) + if (_tolower(s[1]) == 'x') *base = 16; else *base = 8;