From c1328100d4e433479ec52d4b32de39261b9ade55 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 28 Apr 2016 18:42:10 +0000 Subject: [PATCH] printxvals: change type of integer argument to uint64_t This is necessary for the upcoming change of xlat.val type. All users of printxvals are already prepared for this change. * defs.h (printxvals): Change type of integer argument to uint64_t. * util.c (printxvals): Likewise. Print it using PRIx64 format. Patch by Jeff Mahoney . --- defs.h | 2 +- util.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defs.h b/defs.h index 1643e119..d7613f1e 100644 --- a/defs.h +++ b/defs.h @@ -549,7 +549,7 @@ extern int printllval(struct tcb *, const char *, int) ATTRIBUTE_FORMAT((printf, 2, 0)); extern void printaddr(long); -extern void printxvals(const unsigned int, const char *, const struct xlat *, ...) +extern void printxvals(const uint64_t, const char *, const struct xlat *, ...) ATTRIBUTE_SENTINEL; extern int printargs(struct tcb *); extern int printargs_u(struct tcb *); diff --git a/util.c b/util.c index 09ce6d0b..e89400a7 100644 --- a/util.c +++ b/util.c @@ -208,7 +208,7 @@ next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits) * Print entry in struct xlat table, if there. */ void -printxvals(const unsigned int val, const char *dflt, const struct xlat *xlat, ...) +printxvals(const uint64_t val, const char *dflt, const struct xlat *xlat, ...) { va_list args; @@ -223,7 +223,7 @@ printxvals(const unsigned int val, const char *dflt, const struct xlat *xlat, .. } } /* No hits -- print raw # instead. */ - tprintf("%#x /* %s */", val, dflt); + tprintf("%#" PRIx64 " /* %s */", val, dflt); va_end(args); } -- 2.40.0