aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-04-15 15:21:18 -0400
committerNick Mathewson <nickm@torproject.org>2019-04-15 15:21:18 -0400
commit0c42ddf28c330280f66feb7cc92b63f3998468e1 (patch)
tree76e6bf971d11cdfca79071e03229f469c27c73d6
parent821d29e42040789c59d271ba2f1d87a54d6d1435 (diff)
downloadtor-0c42ddf28c330280f66feb7cc92b63f3998468e1.tar.gz
tor-0c42ddf28c330280f66feb7cc92b63f3998468e1.zip
fixup! Even more diagnostic messages for bug 28223.
Use TOR_PRIuSZ in place of %zu.
-rw-r--r--src/feature/nodelist/microdesc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/nodelist/microdesc.c b/src/feature/nodelist/microdesc.c
index af4f608d2f..eaa7f0cafd 100644
--- a/src/feature/nodelist/microdesc.c
+++ b/src/feature/nodelist/microdesc.c
@@ -224,7 +224,8 @@ dump_microdescriptor(int fd, microdesc_t *md, size_t *annotation_len_out)
const char *nulpos = memchr(md->body, 0, md->bodylen);
if (BUG(nulpos)) {
log_warn(LD_BUG, "About to dump a NUL into a microdescriptor file. "
- "offset %"PRId64", bodylen %zu, nul position %zu",
+ "offset %"PRId64", bodylen %"TOR_PRIuSZ", "
+ "nul position %"TOR_PRIuSZ".",
(int64_t)md->off, md->bodylen,
(size_t)(nulpos - md->body));
}
@@ -493,7 +494,7 @@ warn_if_nul_found(const char *inp, size_t len, const char *description)
const char *nul_found = memchr(inp, 0, len);
if (BUG(nul_found)) {
log_warn(LD_BUG, "Found unexpected NUL while reading %s, at "
- "position %zu/%zu.",
+ "position %"TOR_PRIuSZ"/%"TOR_PRIuSZ".",
description, (nul_found - inp), len);
}
}