[master] 1e10378 Fix printf formats for 32/64 issues

Poul-Henning Kamp phk at varnish-cache.org
Fri May 13 13:59:37 CEST 2011


commit 1e10378ad3f7c54b7deaec46d6b792a986b385a0
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri May 13 11:59:24 2011 +0000

    Fix printf formats for 32/64 issues

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index e0d3ef0..ea12752 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -871,7 +871,8 @@ cmd_http_txreq(CMD_ARGS)
 	if (*av != NULL)
 		vtc_log(hp->vl, 0, "Unknown http txreq spec: %s\n", *av);
 	if (body != NULL)
-		vsb_printf(hp->vsb, "Content-Length: %lu%s", strlen(body), nl);
+		vsb_printf(hp->vsb, "Content-Length: %ju%s",
+		    (uintmax_t)strlen(body), nl);
 	vsb_cat(hp->vsb, nl);
 	if (body != NULL) {
 		vsb_cat(hp->vsb, body);
@@ -916,7 +917,8 @@ cmd_http_chunked(CMD_ARGS)
 	AN(av[1]);
 	AZ(av[2]);
 	vsb_clear(hp->vsb);
-	vsb_printf(hp->vsb, "%lx%s%s%s", strlen(av[1]), nl, av[1], nl);
+	vsb_printf(hp->vsb, "%jx%s%s%s",
+	    (uintmax_t)strlen(av[1]), nl, av[1], nl);
 	http_write(hp, 4, "chunked");
 }
 



More information about the varnish-commit mailing list