[master] a08b9d5c4 assert VSB_finish() works

Poul-Henning Kamp phk at FreeBSD.org
Fri Jan 11 17:02:08 UTC 2019


commit a08b9d5c4f7496aca3b82ed4b02f6afd26441037
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Jan 11 17:01:17 2019 +0000

    assert VSB_finish() works

diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index 9fe6ddddf..8b308c03f 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -395,7 +395,7 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
 
 	buf = VSB_new_auto();
 	VSB_printf(buf, ", &%s, \"%s\"", sy1->rname, sy1->name);
-	VSB_finish(buf);
+	AZ(VSB_finish(buf));
 	vcc_Eval_Func(tl, vf, VSB_data(buf), sy2);
 	ERRCHK(tl);
 	SkipToken(tl, ';');
@@ -415,7 +415,7 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
 	/* Instantiate symbols for the methods */
 	VSB_clear(buf);
 	VSB_printf(buf, ", %s", sy1->rname);
-	VSB_finish(buf);
+	AZ(VSB_finish(buf));
 	p = TlDup(tl, VSB_data(buf));
 	while (vv != NULL) {
 		vf = VTAILQ_FIRST(&vv->children);
@@ -426,7 +426,7 @@ vcc_Act_New(struct vcc *tl, struct token *t, struct symbol *sym)
 
 		VSB_clear(buf);
 		VSB_printf(buf, "%s.%s", sy1->name, vf->value);
-		VSB_finish(buf);
+		AZ(VSB_finish(buf));
 		sy3 = VCC_MkSym(tl, VSB_data(buf), SYM_FUNC, VCL_LOW, VCL_HIGH);
 		AN(sy3);
 		func_sym(sy3, sy2->vmod, VTAILQ_NEXT(vf, list));


More information about the varnish-commit mailing list