[4.1] 9bbbc0b Make sure the step numbes are decreasing
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Tue Sep 13 13:07:11 CEST 2016
commit 9bbbc0b1437656a3be65814eaf9ad438b4e77cfb
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date: Thu Sep 8 12:57:00 2016 +0200
Make sure the step numbes are decreasing
Thanks @nigoroll for the suggestion.
diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index 5db516f..d6bbfcf 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -333,7 +333,7 @@ EmitCoordinates(const struct vcc *tl, struct vsb *vsb)
static void
EmitInitFini(const struct vcc *tl)
{
- struct inifin *p;
+ struct inifin *p, *q = NULL;
unsigned has_event = 0;
Fh(tl, 0, "\n");
@@ -370,6 +370,8 @@ EmitInitFini(const struct vcc *tl)
Fc(tl, 0, "\t(void)VGC_function_vcl_fini(ctx);\n\n");
VTAILQ_FOREACH_REVERSE(p, &tl->inifin, inifinhead, list) {
AZ(VSB_finish(p->fin));
+ if (q)
+ assert(q->n > p->n);
if (VSB_len(p->fin)) {
Fc(tl, 0, "\t/* %u */\n", p->n);
Fc(tl, 0, "\tif (vgc_inistep >= %u) {\n", p->n);
More information about the varnish-commit
mailing list