From b19946cc627b3c027a527bc51cfe2e08ead46b07 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Wed, 3 Jul 2019 14:40:11 -0600 Subject: console: Remove support for printing extra bases vtxprintf() can only print numbers in base 8, 10, and 16, so the extra letters in the alphabet aren't needed. Change-Id: I6a51c13f3298a597e801440f86bf698bdd8c736a Signed-off-by: Jacob Garber Reviewed-on: https://review.coreboot.org/c/coreboot/+/34028 Tested-by: build bot (Jenkins) Reviewed-by: HAOUAS Elyes Reviewed-by: Nico Huber --- src/console/vtxprintf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c index 01091c82e8..2d4953d013 100644 --- a/src/console/vtxprintf.c +++ b/src/console/vtxprintf.c @@ -38,7 +38,7 @@ static int number(void (*tx_byte)(unsigned char byte, void *data), void *data) { char c, sign, tmp[66]; - const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz"; + const char *digits = "0123456789abcdef"; int i; int count = 0; #ifdef SUPPORT_64BIT_INTS @@ -57,11 +57,9 @@ static int number(void (*tx_byte)(unsigned char byte, void *data), #endif if (type & LARGE) - digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + digits = "0123456789ABCDEF"; if (type & LEFT) type &= ~ZEROPAD; - if (base < 2 || base > 36) - return 0; c = (type & ZEROPAD) ? '0' : ' '; sign = 0; if (type & SIGN) { -- cgit v1.2.3