From: phk Date: Fri, 12 Sep 2008 09:39:35 +0000 (+0000) Subject: Don't allocate space for a %u and then stick a %d in it. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=771bfa46b430c95d667608c0449788606e78495d;p=varnish Don't allocate space for a %u and then stick a %d in it. Tripped by: anordby git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3183 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index 5dedccff..891106a6 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -480,7 +480,7 @@ VRT_r_req_xid(struct sess *sp) size = snprintf(NULL, 0, "%u", sp->xid) + 1; AN(p = WS_Alloc(sp->http->ws, size)); - assert(snprintf(p, size, "%d", sp->xid) < size); + assert(snprintf(p, size, "%u", sp->xid) < size); return (p); }