Skip to content

Commit 4e12804

Browse files
committed
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 <dwagner@suse.de>
1 parent f9050af commit 4e12804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/utils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void process_field_size_8(int offset, char *sfield, __u8 *buf, char *datastr)
187187

188188
lval_lo = *((__u64 *)(&buf[offset]));
189189

190-
sprintf(buffer, "%lx", __builtin_bswap64(lval_lo));
190+
sprintf(buffer, "%"PRIx64, __builtin_bswap64(lval_lo));
191191
sprintf(datastr, "%s", hex_to_ascii(buffer));
192192
} else if (strstr(sfield, "Timestamp")) {
193193
char ts_buf[128];

0 commit comments

Comments
 (0)