From 1b1338bc044c221dd52c2a97aa1807e9d801b55f Mon Sep 17 00:00:00 2001 From: Yin Fengwei Date: Tue, 30 Oct 2018 16:03:57 +0800 Subject: [PATCH] snprintf: Remove the %o and %p support %x could be used to replace the %o print option. %x could be used to replace the %p print option also. Tracked-On: #1656 Signed-off-by: Yin Fengwei Acked-by: Eddie Dong --- hypervisor/lib/sprintf.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/hypervisor/lib/sprintf.c b/hypervisor/lib/sprintf.c index 521807cb1..c23030c80 100644 --- a/hypervisor/lib/sprintf.c +++ b/hypervisor/lib/sprintf.c @@ -508,19 +508,6 @@ void do_print(const char *fmt_arg, struct print_param *param, uint32_t)); } } - /* octal number */ - else if (ch == 'o') { - if ((param->vars.flags & - PRINT_FLAG_LONG_LONG) != 0U) { - print_pow2(param, - __builtin_va_arg(args, - uint64_t), 3U); - } else { - print_pow2(param, - __builtin_va_arg(args, - uint32_t), 3U); - } - } /* hexadecimal number */ else if ((ch == 'X') || (ch == 'x')) { if (ch == 'X') { @@ -546,12 +533,6 @@ void do_print(const char *fmt_arg, struct print_param *param, } print_string(param, s); } - /* pointer argument */ - else if (ch == 'p') { - param->vars.flags |= PRINT_FLAG_ALTERNATE_FORM; - print_pow2(param, (uint64_t) - __builtin_va_arg(args, void *), 4U); - } /* single character argument */ else if (ch == 'c') { char c[2];