[master] d046301 Fix a couple of printfs to be 64/intmax correct.
Poul-Henning Kamp
phk at varnish-cache.org
Mon Apr 18 12:39:33 CEST 2011
commit d04630124946b33bbd6da2853317844c87f96a3a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Apr 18 10:30:54 2011 +0000
Fix a couple of printfs to be 64/intmax correct.
diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index 1c1118c..691187c 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -325,7 +325,7 @@ cnt_done(struct sess *sp)
da = sp->t_end - sp->t_resp;
dh = sp->t_req - sp->t_open;
/* XXX: Add StatReq == StatSess */
- WSP(sp, SLT_Length, "%u", sp->acct_req.bodybytes);
+ WSP(sp, SLT_Length, "%ju", (uintmax_t)sp->acct_req.bodybytes);
WSL(sp->wrk, SLT_ReqEnd, sp->id, "%u %.9f %.9f %.9f %.9f %.9f",
sp->xid, sp->t_req, sp->t_end, dh, dp, da);
}
diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c
index 87ce092..488575d 100644
--- a/bin/varnishd/cache_fetch.c
+++ b/bin/varnishd/cache_fetch.c
@@ -585,7 +585,7 @@ FetchBody(struct sess *sp)
if (mklen > 0) {
http_Unset(sp->obj->http, H_Content_Length);
http_PrintfHeader(sp->wrk, sp->fd, sp->obj->http,
- "Content-Length: %u", sp->obj->len);
+ "Content-Length: %jd", (intmax_t)sp->obj->len);
}
if (cls)
More information about the varnish-commit
mailing list