[master] 2a5db07e0 Polish the generated C code for the set action
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Dec 2 12:14:07 UTC 2019
commit 2a5db07e0cc67094b4db6d10c4b9e90d46ea0d4b
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Wed Nov 6 15:00:27 2019 +0100
Polish the generated C code for the set action
diff --git a/lib/libvcc/vcc_action.c b/lib/libvcc/vcc_action.c
index 515a47a18..5899b2b30 100644
--- a/lib/libvcc/vcc_action.c
+++ b/lib/libvcc/vcc_action.c
@@ -92,6 +92,7 @@ static void
vcc_assign_expr(struct vcc *tl, struct symbol *sym, const struct assign *ap)
{
const char *e;
+ unsigned indent = 1;
e = ap->expr;
if (e == NULL)
@@ -99,9 +100,10 @@ vcc_assign_expr(struct vcc *tl, struct symbol *sym, const struct assign *ap)
while (*e != '\0') {
if (*e == '\v')
- Fb(tl, 0, "%s", sym->rname);
+ Fb(tl, indent, "%s", sym->rname);
else
- Fb(tl, 0, "%c", *e);
+ Fb(tl, indent, "%c", *e);
+ indent = 0;
e++;
}
}
More information about the varnish-commit
mailing list