Skip to content

Commit

Permalink
Correct format specifier for printing int64_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjander0 committed Nov 30, 2023
1 parent 97c2e40 commit 4264d09
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/iperf_locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
#if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
#else
# ifndef PRIu64
# ifndef PRId64
# if sizeof(long) == 8
# define PRIu64 "lu"
# define PRId64 "ld"
# else
# define PRIu64 "llu"
# define PRId64 "lld"
# endif
# endif
#endif
Expand Down Expand Up @@ -394,13 +394,13 @@ const char report_bw_retrans_cwnd_format[] =
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3u %ss %s\n";

const char report_bw_udp_format[] =
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRIu64 "/%" PRIu64 " (%.2g%%) %s\n";
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRId64 "/%" PRId64 " (%.2g%%) %s\n";

const char report_bw_udp_format_no_omitted_error[] =
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms Unknown/%" PRIu64 " %s\n";
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms Unknown/%" PRId64 " %s\n";

const char report_bw_udp_sender_format[] =
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %s %" PRIu64 " %s\n";
"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %s %" PRId64 " %s\n";

const char report_summary[] =
"Test Complete. Summary Results:\n";
Expand All @@ -412,10 +412,10 @@ const char report_sum_bw_retrans_format[] =
"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %3d %s\n";

const char report_sum_bw_udp_format[] =
"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRIu64 "/%" PRIu64 " (%.2g%%) %s\n";
"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRId64 "/%" PRId64 " (%.2g%%) %s\n";

const char report_sum_bw_udp_sender_format[] =
"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %s %" PRIu64 " %s\n";
"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %s %" PRId64 " %s\n";

const char report_omitted[] = "(omitted)";

Expand Down

0 comments on commit 4264d09

Please sign in to comment.