]> granicus.if.org Git - strace/commitdiff
printxvals: change type of integer argument to uint64_t
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 28 Apr 2016 18:42:10 +0000 (18:42 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 28 Apr 2016 19:04:02 +0000 (19:04 +0000)
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 <jeffm@suse.com>.

defs.h
util.c

diff --git a/defs.h b/defs.h
index 1643e119a238509907cd5457762917d211859e3c..d7613f1e5dcb7bd855b2e9c0eb7f9f0586d42f96 100644 (file)
--- 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 09ce6d0bc35349c7176a0981343bb6ceeec13aa5..e89400a79882653e5fc8f8acc1a7389e3a0efa72 100644 (file)
--- 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);
 }