diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-03-26 02:01:31 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-03-26 02:01:31 -0700 |
commit | 56bcff3da9fa58a9b3f8132d71a2fd9497ef799e (patch) | |
tree | 7f564c232d59ed72c12dd58ac1f473ae5e0e4094 /print-zeromq.c | |
parent | bfd4b6b7f5853131865fe1eb5fad736e4cc7cb54 (diff) | |
download | tcpdump-56bcff3da9fa58a9b3f8132d71a2fd9497ef799e.tar.gz |
We don't define PRIu8 or PRIx8 if the C environment doesn't; don't use it.
The right format to use to print 8-bit quantities isn't
implementation-dependent, so no need to use the PRIu8 and PRIx8 macros.
There's also no need for an empty string after PRIu64. Separate it with
space from the strings with which it's being concatenated, however; we
do that elsewhere.
Diffstat (limited to 'print-zeromq.c')
-rw-r--r-- | print-zeromq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/print-zeromq.c b/print-zeromq.c index d5ac4bd3..10ca2cc4 100644 --- a/print-zeromq.c +++ b/print-zeromq.c @@ -87,7 +87,7 @@ zmtp1_print_frame(const u_char *cp, const u_char *ep) { body_len_declared = cp[0]; if (body_len_declared == 0) return cp + header_len; /* skip to next frame */ - printf(" frame flags+body (8-bit) length %"PRIu8"", cp[0]); + printf(" frame flags+body (8-bit) length %u", cp[0]); TCHECK2(*cp, header_len + 1); /* length, flags */ flags = cp[1]; } else { @@ -97,15 +97,15 @@ zmtp1_print_frame(const u_char *cp, const u_char *ep) { body_len_declared = EXTRACT_64BITS(cp + 1); if (body_len_declared == 0) return cp + header_len; /* skip to next frame */ - printf(" %"PRIu64"", body_len_declared); + printf(" %" PRIu64, body_len_declared); TCHECK2(*cp, header_len + 1); /* 0xFF, length, flags */ flags = cp[9]; } body_len_captured = ep - cp - header_len; if (body_len_declared > body_len_captured) - printf(" (%"PRIu64" captured)", body_len_captured); - printf(", flags 0x%02"PRIx8"", flags); + printf(" (%" PRIu64 " captured)", body_len_captured); + printf(", flags 0x%02x", flags); if (vflag) { u_int64_t body_len_printed = MIN(body_len_captured, body_len_declared); @@ -123,7 +123,7 @@ zmtp1_print_frame(const u_char *cp, const u_char *ep) { if (vflag == 1) body_len_printed = MIN(VBYTES + 1, body_len_printed); if (body_len_printed > 1) { - printf(", first %"PRIu64" byte(s) of body:", body_len_printed - 1); + printf(", first %" PRIu64 " byte(s) of body:", body_len_printed - 1); hex_and_ascii_print("\n\t ", cp + header_len + 1, body_len_printed - 1); printf("\n"); } |