[master] 7e7d72a Polish for sunos compiler

Poul-Henning Kamp phk at FreeBSD.org
Tue May 23 21:48:06 CEST 2017


commit 7e7d72aac25ca1bcb00ff56f63620568e24d0fb5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 23 19:47:11 2017 +0000

    Polish for sunos compiler

diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index e58f64f..70053ec 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -333,7 +333,6 @@ vsc_build_vf_list(struct VSM_data *vd)
 {
 	uint64_t u;
 	struct vsc *vsc = vsc_setup(vd);
-	struct vjsn *vj;
 	const char *p;
 	const char *e;
 
@@ -343,20 +342,16 @@ vsc_build_vf_list(struct VSM_data *vd)
 	VSM_FOREACH(&vsc->iter_fantom, vd) {
 		if (strcmp(vsc->iter_fantom.class, VSC_CLASS))
 			continue;
-		u = vbe64dec(vsc->iter_fantom.b);
 		vsc_build_old_vf_list(vsc);
-		if (u == 0) {
-			fprintf(stderr, "%s has no JSON\n", vsc->iter_fantom.type);
-			exit(2);
-		}
+		u = vbe64dec(vsc->iter_fantom.b);
+		assert(u > 0);
 		p = (char*)vsc->iter_fantom.b + 8 + u;
-		vj = vjsn_parse(p, &e);
+		(void)vjsn_parse(p, &e);
 		if (e != NULL) {
 			fprintf(stderr, "%s\n", p);
 			fprintf(stderr, "JSON ERROR %s\n", e);
 		}
 		AZ(e);
-		//vjsn_dump(vj, stdout);
 	}
 }
 



More information about the varnish-commit mailing list