[master] 90f4f1494 Fix cast for %jd

Poul-Henning Kamp phk at FreeBSD.org
Mon Dec 4 12:50:06 UTC 2023


commit 90f4f1494cd31976cf38f6a48f01c3a44445f4dc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Dec 4 12:48:51 2023 +0000

    Fix cast for %jd

diff --git a/lib/libvarnish/vtim.c b/lib/libvarnish/vtim.c
index 2d3569e86..1894fa0ee 100644
--- a/lib/libvarnish/vtim.c
+++ b/lib/libvarnish/vtim.c
@@ -561,8 +561,8 @@ bench(void)
 	s = VTIM_mono();
 	for (i=0; i<100000; i++) {
 		snprintf(buf, sizeof(buf), "%ju.%06ju",
-		    (uint64_t)floor(s),
-		    (uint64_t)floor((s * 1e6)) % 1000000UL);
+		    (uintmax_t)floor(s),
+		    (uintmax_t)floor((s * 1e6)) % 1000000UL);
 		t_i += buf[4];
 	}
 	e = VTIM_mono();


More information about the varnish-commit mailing list