[master] face33b Fix a unused value (when not debugging) spotted by Coverity

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 30 00:35:08 CEST 2016


commit face33b7cade7a503cd49cc5e54fddd90b350cda
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 29 22:21:04 2016 +0000

    Fix a unused value (when not debugging) spotted by Coverity

diff --git a/bin/varnishd/cache/cache_esi_parse.c b/bin/varnishd/cache/cache_esi_parse.c
index 744089a..4df0c8c 100644
--- a/bin/varnishd/cache/cache_esi_parse.c
+++ b/bin/varnishd/cache/cache_esi_parse.c
@@ -582,14 +582,11 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
 
 	while (p < e) {
 		AN(vep->state);
-		i = e - p;
-		if (i > 10)
-			i = 10;
 		Debug("EP %s %d (%.*s) [%.*s]\n",
 		    vep->state,
 		    vep->remove,
 		    vep->tag_i, vep->tag,
-		    i, p);
+		    (e - p) > 10 ? 10 : (int)(e-p), p);
 		assert(p >= vep->ver_p);
 
 		/******************************************************



More information about the varnish-commit mailing list