From 33b1fa9485fc01d4a0f4b71987aa211797ddf770 Mon Sep 17 00:00:00 2001 From: Yutao Ai Date: Wed, 25 Nov 2020 01:45:14 +0000 Subject: [PATCH] monitor:Don't use '#' flag of printf format ('%#') in format strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Delete '#' and use '0x' prefix instead Signed-off-by: Yutao Ai Message-Id: <20201125014514.55562-4-aiyutao@huawei.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Dr. David Alan Gilbert --- monitor/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/misc.c b/monitor/misc.c index 09f9a74d78..6f5ae096dc 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -919,7 +919,7 @@ static void hmp_ioport_read(Monitor *mon, const QDict *qdict) suffix = 'l'; break; } - monitor_printf(mon, "port%c[0x%04x] = %#0*x\n", + monitor_printf(mon, "port%c[0x%04x] = 0x%0*x\n", suffix, addr, size * 2, val); } -- 2.42.0