[master] a17c1c999 Slightly better layout of generated C source for arg structs

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 6 11:57:09 UTC 2019


commit a17c1c999b6d8d0d01ee5972b3f29f3237e3ba34
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 6 11:19:34 2019 +0000

    Slightly better layout of generated C source for arg structs

diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index b1ed9b64e..054b2ef56 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -570,7 +570,7 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
 	}
 
 	if (sa != NULL)
-		e1 = vcc_mk_expr(rfmt, "%s(ctx%s,\v+ &(%s){\n",
+		e1 = vcc_mk_expr(rfmt, "%s(ctx%s,\v+\n&(%s)\v+ {\n",
 		    cfunc, extra, sa);
 	else
 		e1 = vcc_mk_expr(rfmt, "%s(ctx%s\v+", cfunc, extra);
@@ -607,7 +607,7 @@ vcc_func(struct vcc *tl, struct expr **e, const void *priv,
 		free(fa);
 	}
 	if (sa != NULL) {
-		*e = vcc_expr_edit(tl, e1->fmt, "\v1\n})\v-", e1, NULL);
+		*e = vcc_expr_edit(tl, e1->fmt, "\v1\v-\n}\v-\n)", e1, NULL);
 	} else {
 		*e = vcc_expr_edit(tl, e1->fmt, "\v1\v-\n)", e1, NULL);
 	}


More information about the varnish-commit mailing list