diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-06-07 22:12:28 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-06-07 22:12:28 -0700 |
commit | f6d40d5bb85448810ec5749b40403db4d269583f (patch) | |
tree | 47a9a1ff5088367b5a486b57e0e991e1e5d1c536 /print-forces.c | |
parent | 4e93f682e3b3f404aa5e1b579a9e81c6c523ceff (diff) | |
download | tcpdump-f6d40d5bb85448810ec5749b40403db4d269583f.tar.gz |
Fix printing of 64-bit quantities.
Do *NOT* assume that "%l[doxu]x" - or "%ll[doxu]" - is the way to print
a 64-bit quantity; on UN*X, it might be a "long" or a "long long",
depending on whether you're on a 32-bit or 64-bit platform and, on
Windows with MSVC++, it's not a long (even in 64-bit mode) and doesn't
use "%ll[doxu]", either. Instead, use PRI[doxu]64; that's what C99
defines, and what we define ourselves if the C environment doesn't
define it.
Diffstat (limited to 'print-forces.c')
-rw-r--r-- | print-forces.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-forces.c b/print-forces.c index 8384875f..ec11635b 100644 --- a/print-forces.c +++ b/print-forces.c @@ -1016,7 +1016,7 @@ void forces_print(register const u_char * pptr, register u_int len) if (vflag >= 1) { printf("\n\tForCES Version %d len %uB flags 0x%08x ", ForCES_V(fhdr), mlen, flg_raw); - printf("\n\tSrcID 0x%x(%s) DstID 0x%x(%s) Correlator 0x%lx", + printf("\n\tSrcID 0x%x(%s) DstID 0x%x(%s) Correlator 0x%" PRIx64, ForCES_SID(fhdr), ForCES_node(ForCES_SID(fhdr)), ForCES_DID(fhdr), ForCES_node(ForCES_DID(fhdr)), EXTRACT_64BITS(fhdr->fm_cor)); |