From 4e128046c4a89b2f8a1ae669a5f305d053ae4add Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 17 Jul 2024 17:39:23 +0200 Subject: [PATCH] utils: fix print formatting option A 64bit value to print needs to use the PRIx macros to work on 32bit and 64bit platforms. Signed-off-by: Daniel Wagner --- util/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/utils.c b/util/utils.c index 5e3038b945..5d776522fb 100644 --- a/util/utils.c +++ b/util/utils.c @@ -187,7 +187,7 @@ void process_field_size_8(int offset, char *sfield, __u8 *buf, char *datastr) lval_lo = *((__u64 *)(&buf[offset])); - sprintf(buffer, "%lx", __builtin_bswap64(lval_lo)); + sprintf(buffer, "%"PRIx64, __builtin_bswap64(lval_lo)); sprintf(datastr, "%s", hex_to_ascii(buffer)); } else if (strstr(sfield, "Timestamp")) { char ts_buf[128];