lib/vsprintf: Use isodigit() for the octal number check
Subsystems (2)
Andy Shevchenko
reviewerPATCH 1/1 lib/vsprintf: Use isodigit() for the octal number check
Use isodigit() to test the octal number instead of homegrown approach.
Signed-off-by Andy Shevchenko <[email protected]>
--- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/vsprintf.c +1 -1
@@ -3642,7 +3642,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)if (!digit || (base ==16 && !isxdigit (digit)) || (base ==10 && !isdigit (digit)) - || (base ==8 && (!isdigit (digit) || digit >'7' )) + || (base ==8 && !isodigit (digit)) || (base ==0 && !isdigit (digit)))break ;
Signature · 1 line
2.40.0.1.gaa8946217a0b
Quoted 4 lines · Andy Shevchenko
Use
isodigit()to test the octal number instead of homegrown approach.Signed-off-by Andy Shevchenko <[email protected]>
FWIW
Reviewed-by Sergey Senozhatsky <[email protected]>
Quoted 3 lines · Andy Shevchenko
Use
isodigit()to test the octal number instead of homegrown approach.Signed-off-by Andy Shevchenko <[email protected]>
Reviewed-by Petr Mladek <[email protected]>
Best Regards,
Petr
Petr Mladek
maintainerQuoted 3 lines · Andy Shevchenko
Use
isodigit()to test the octal number instead of homegrown approach.Signed-off-by Andy Shevchenko <[email protected]>
JFYI, the patch has been committed into printk/linux.git, branch for-6.4.
Best Regards,
Petr