[6.0] a63415b47 avoid 3 duplicated lines (very minor)
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Dec 18 20:51:07 UTC 2019
commit a63415b47b48d0257f606ef28d259372276c0d03
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Sep 30 15:22:17 2019 +0200
avoid 3 duplicated lines (very minor)
Ref #3067
diff --git a/lib/libvcc/vcc_backend.c b/lib/libvcc/vcc_backend.c
index 4c8c0718c..6bdaeb65e 100644
--- a/lib/libvcc/vcc_backend.c
+++ b/lib/libvcc/vcc_backend.c
@@ -321,10 +321,12 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
"?proxy_header",
NULL);
- if (tl->t->tok == ID && (vcc_IdIs(tl->t, "none") || vcc_IdIs(tl->t, "None"))) {
- vsb = VSB_new_auto();
- AN(vsb);
- tl->fb = vsb;
+ vsb = VSB_new_auto();
+ AN(vsb);
+ tl->fb = vsb;
+
+ if (tl->t->tok == ID &&
+ (vcc_IdIs(tl->t, "none") || vcc_IdIs(tl->t, "None"))) {
Fb(tl, 0, "\n\t%s = (NULL);\n", vgcname);
vcc_NextToken(tl);
SkipToken(tl, ';');
@@ -333,10 +335,6 @@ vcc_ParseHostDef(struct vcc *tl, const struct token *t_be, const char *vgcname)
SkipToken(tl, '{');
- vsb = VSB_new_auto();
- AN(vsb);
- tl->fb = vsb;
-
Fb(tl, 0, "\nstatic const struct vrt_backend vgc_dir_priv_%s = {\n",
vgcname);
More information about the varnish-commit
mailing list