addflags: change type of integer argument to uint64_t
This is necessary for the upcoming change of xlat.val type.
All users of addflags are already prepared for this change.
* defs.h (addflags): Change type of integer argument to uint64_t.
* util.c (addflags): Likewise. Print it using PRIx64 format.
Based on patch by Jeff Mahoney <jeffm@suse.com>.
diff --git a/util.c b/util.c
index 1e5aecc..763fd11 100644
--- a/util.c
+++ b/util.c
@@ -303,7 +303,7 @@
* return # of flags printed.
*/
void
-addflags(const struct xlat *xlat, int flags)
+addflags(const struct xlat *xlat, uint64_t flags)
{
for (; xlat->str; xlat++) {
if (xlat->val && (flags & xlat->val) == xlat->val) {
@@ -312,7 +312,7 @@
}
}
if (flags) {
- tprintf("|%#x", flags);
+ tprintf("|%#" PRIx64, flags);
}
}