Skip to content

Commit

Permalink
utils: fix print formatting option
Browse files Browse the repository at this point in the history
A 64bit value to print needs to use the PRIx macros to work on 32bit and
64bit platforms.

Signed-off-by: Daniel Wagner <[email protected]>
  • Loading branch information
igaw committed Jul 17, 2024
1 parent f9050af commit 4e12804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 4e12804

Please sign in to comment.