summaryrefslogtreecommitdiff
path: root/src/test
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/test
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/test')
-rw-r--r--src/test/test-timers.c4
-rw-r--r--src/test/test_util.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test-timers.c b/src/test/test-timers.c
index f6ff9a5f80..aed150bda6 100644
--- a/src/test/test-timers.c
+++ b/src/test/test-timers.c
@@ -104,8 +104,8 @@ main(int argc, char **argv)
total_square_difference += diff*diff;
}
const int64_t mean_diff = total_difference / n_active_timers;
- printf("mean difference: "I64_FORMAT" usec\n",
- I64_PRINTF_ARG(mean_diff));
+ printf("mean difference: %"PRId64" usec\n",
+ (mean_diff));
const double mean_sq = ((double)total_square_difference)/ n_active_timers;
const double sq_mean = mean_diff * mean_diff;
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 5fea1a463d..67a10a8a57 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -1918,8 +1918,8 @@ test_util_strmisc(void *arg)
tor_snprintf(buf, 10, "abcdef");
tt_int_op(0,OP_EQ, buf[6]);
/* uint64 */
- tor_snprintf(buf, sizeof(buf), "x!"U64_FORMAT"!x",
- U64_PRINTF_ARG(UINT64_C(12345678901)));
+ tor_snprintf(buf, sizeof(buf), "x!%"PRIu64"!x",
+ (UINT64_C(12345678901)));
tt_str_op("x!12345678901!x",OP_EQ, buf);
/* Test str{,case}cmpstart */
@@ -5557,7 +5557,7 @@ test_util_max_mem(void *arg)
tt_int_op(r, OP_EQ, r2);
tt_uint_op(memory2, OP_EQ, memory1);
- TT_BLATHER(("System memory: "U64_FORMAT, U64_PRINTF_ARG(memory1)));
+ TT_BLATHER(("System memory: %"PRIu64, (memory1)));
if (r==0) {
/* You have at least a megabyte. */