From 64e161f307a7eca52131accb9f63e6435d90f5cc Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 10 Aug 2012 07:36:20 +0400 Subject: [PATCH] show: Tune protobus showers for .int(32|64) Use # for both and don't use fixed field width for 32bit one (as they are most likely just some values, while the 64bit is some address which is better to be printed with full width). Signed-off-by: Pavel Emelyanov --- protobuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protobuf.c b/protobuf.c index 7ca3fe6c6..1835a0553 100644 --- a/protobuf.c +++ b/protobuf.c @@ -138,12 +138,12 @@ typedef void (pb_pr_field_t)(void *obj, pb_pr_ctl_t *ctl); static void pb_msg_int32x(void *obj, pb_pr_ctl_t *ctl) { - pr_msg("0x%08x", *(int *)obj); + pr_msg("%#x", *(int *)obj); } static void pb_msg_int64x(void *obj, pb_pr_ctl_t *ctl) { - pr_msg("0x%016lx", *(long *)obj); + pr_msg("%#016lx", *(long *)obj); } static void pb_msg_string(void *obj, pb_pr_ctl_t *ctl)