All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check
@ 2023-03-27 14:27 Andy Shevchenko
  2023-03-28  1:36 ` Sergey Senozhatsky
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2023-03-27 14:27 UTC (permalink / raw)
  To: Petr Mladek, linux-kernel
  Cc: Steven Rostedt, Sergey Senozhatsky, Andy Shevchenko, Rasmus Villemoes

Use isodigit() to test the octal number instead of homegrown approach.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 lib/vsprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index fbe320b5e89f..40f560959b16 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -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;
 
-- 
2.40.0.1.gaa8946217a0b


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check
  2023-03-27 14:27 [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check Andy Shevchenko
@ 2023-03-28  1:36 ` Sergey Senozhatsky
  2023-03-28  8:43 ` Petr Mladek
  2023-04-03 10:39 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2023-03-28  1:36 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Petr Mladek, linux-kernel, Steven Rostedt, Sergey Senozhatsky,
	Rasmus Villemoes

On (23/03/27 17:27), Andy Shevchenko wrote:
> 
> Use isodigit() to test the octal number instead of homegrown approach.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check
  2023-03-27 14:27 [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check Andy Shevchenko
  2023-03-28  1:36 ` Sergey Senozhatsky
@ 2023-03-28  8:43 ` Petr Mladek
  2023-04-03 10:39 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2023-03-28  8:43 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Steven Rostedt, Sergey Senozhatsky, Rasmus Villemoes

On Mon 2023-03-27 17:27:21, Andy Shevchenko wrote:
> Use isodigit() to test the octal number instead of homegrown approach.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check
  2023-03-27 14:27 [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check Andy Shevchenko
  2023-03-28  1:36 ` Sergey Senozhatsky
  2023-03-28  8:43 ` Petr Mladek
@ 2023-04-03 10:39 ` Petr Mladek
  2 siblings, 0 replies; 4+ messages in thread
From: Petr Mladek @ 2023-04-03 10:39 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Steven Rostedt, Sergey Senozhatsky, Rasmus Villemoes

On Mon 2023-03-27 17:27:21, Andy Shevchenko wrote:
> Use isodigit() to test the octal number instead of homegrown approach.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

JFYI, the patch has been committed into printk/linux.git,
branch for-6.4.

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-03 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 14:27 [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check Andy Shevchenko
2023-03-28  1:36 ` Sergey Senozhatsky
2023-03-28  8:43 ` Petr Mladek
2023-04-03 10:39 ` Petr Mladek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.