From 4264d092b62cdea836a684546167cf4cca85ae1c Mon Sep 17 00:00:00 2001 From: kjander0 Date: Thu, 30 Nov 2023 20:48:42 +1000 Subject: [PATCH] Correct format specifier for printing int64_t. --- src/iperf_locale.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/iperf_locale.c b/src/iperf_locale.c index 838086e18..865732615 100644 --- a/src/iperf_locale.c +++ b/src/iperf_locale.c @@ -84,11 +84,11 @@ #if defined(HAVE_INTTYPES_H) # include #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 @@ -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"; @@ -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)";