summaryrefslogtreecommitdiff
path: root/src/or/status.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-03 10:40:59 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-03 10:40:59 -0400
commit9568c0ce3d3885a41ca44ac030b04d089ac56a40 (patch)
tree1517c61a9f45ded3fc961231d517c02dc94a5860 /src/or/status.c
parent52884f56d43670f1960d9354ccc3ace9a048e283 (diff)
downloadtor-9568c0ce3d3885a41ca44ac030b04d089ac56a40.tar.gz
tor-9568c0ce3d3885a41ca44ac030b04d089ac56a40.zip
Return U64_PRINTF_ARG and U64_FORMAT
The standard is printf("%"PRIu64, x);
Diffstat (limited to 'src/or/status.c')
-rw-r--r--src/or/status.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/status.c b/src/or/status.c
index d0b3bc5536..5c0a768ace 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -77,7 +77,7 @@ bytes_to_usage(uint64_t bytes)
char *bw_string = NULL;
if (bytes < (1<<20)) { /* Less than a megabyte. */
- tor_asprintf(&bw_string, U64_FORMAT" kB", U64_PRINTF_ARG(bytes>>10));
+ tor_asprintf(&bw_string, "%"PRIu64" kB", (bytes>>10));
} else if (bytes < (1<<30)) { /* Megabytes. Let's add some precision. */
double bw = U64_TO_DBL(bytes);
tor_asprintf(&bw_string, "%.2f MB", bw/(1<<20));
@@ -188,12 +188,12 @@ log_heartbeat(time_t now)
const uint64_t main_loop_idle_count = get_main_loop_idle_count();
log_fn(LOG_NOTICE, LD_HEARTBEAT, "Main event loop statistics: "
- U64_FORMAT " successful returns, "
- U64_FORMAT " erroneous returns, and "
- U64_FORMAT " idle returns.",
- U64_PRINTF_ARG(main_loop_success_count),
- U64_PRINTF_ARG(main_loop_error_count),
- U64_PRINTF_ARG(main_loop_idle_count));
+ "%"PRIu64 " successful returns, "
+ "%"PRIu64 " erroneous returns, and "
+ "%"PRIu64 " idle returns.",
+ (main_loop_success_count),
+ (main_loop_error_count),
+ (main_loop_idle_count));
}
/** Now, if we are an HS service, log some stats about our usage */