diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-07-29 13:00:48 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-07-29 13:00:48 -0700 |
commit | 174b3ec974cf30a02328193c5ef50d2ed56afa91 (patch) | |
tree | 92cbcf55bf227b81082b17ffeef4103a0f7cd871 /print-hncp.c | |
parent | db752b7f79065d0d90bec13694af6c2c6e32c5d3 (diff) | |
download | tcpdump-174b3ec974cf30a02328193c5ef50d2ed56afa91.tar.gz |
Use PRIx64 to print a 64-bit number in hex.
"lx" doesn't work on ILP32 or LLP64 platforms.
Diffstat (limited to 'print-hncp.c')
-rw-r--r-- | print-hncp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-hncp.c b/print-hncp.c index cca45f54..7bcc7494 100644 --- a/print-hncp.c +++ b/print-hncp.c @@ -151,7 +151,7 @@ format_256(const u_char *data) static char buf[4][64+5]; static int i = 0; i = (i + 1) % 4; - snprintf(buf[i], 28, "%016lx%016lx%016lx%016lx", + snprintf(buf[i], 28, "%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "%016" PRIx64, EXTRACT_64BITS(data), EXTRACT_64BITS(data + 8), EXTRACT_64BITS(data + 16), @@ -467,7 +467,7 @@ hncp_print_rec(netdissect_options *ndo, if (bodylen != 8) goto invalid; hash = EXTRACT_64BITS(value); - ND_PRINT((ndo, " hash: %016lx", hash)); + ND_PRINT((ndo, " hash: %016" PRIx64, hash)); } break; @@ -481,7 +481,7 @@ hncp_print_rec(netdissect_options *ndo, sequence_number = EXTRACT_32BITS(value + 4); time = format_interval(EXTRACT_32BITS(value + 8)); hash = EXTRACT_64BITS(value + 12); - ND_PRINT((ndo, " NID: %s seqno: %u %s hash: %016lx", + ND_PRINT((ndo, " NID: %s seqno: %u %s hash: %016" PRIx64, node_identifier, sequence_number, time, |