From 49fcac30dca9d735afa4c755ed0ef1e2156609fd Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 14 Aug 2013 12:09:31 +0300 Subject: [PATCH] x86/boot: Fix a sanity check in printf.c Prior to 55d3b99b02 ("x86: trivial printk optimizations") this was 36 because it had 26 characters and 10 digits but now it's just 16 hex digits so the sanity check needs updated. This function is always called with a valid "base" so it doesn't make a difference to how the kernel works, it's just a cleanup. Reported-by: Alexey Petrenko Signed-off-by: Dan Carpenter Signed-off-by: Ingo Molnar --- arch/x86/boot/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index cdac91ca55d38..565083c16e5cf 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c @@ -55,7 +55,7 @@ static char *number(char *str, long num, int base, int size, int precision, locase = (type & SMALL); if (type & LEFT) type &= ~ZEROPAD; - if (base < 2 || base > 36) + if (base < 2 || base > 16) return NULL; c = (type & ZEROPAD) ? '0' : ' '; sign = 0; -- 2.39.5