[master] 47c8927bd So much for untested "stylistic" changes before commit.

Poul-Henning Kamp phk at FreeBSD.org
Wed Aug 22 09:31:09 UTC 2018


commit 47c8927bdb090c7154bc15f2e0722324d01831b2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Aug 22 09:29:41 2018 +0000

    So much for untested "stylistic" changes before commit.
    
    In other news:  VTEST works.

diff --git a/lib/libvcc/vcc_parse.c b/lib/libvcc/vcc_parse.c
index cc0c34751..ee8830859 100644
--- a/lib/libvcc/vcc_parse.c
+++ b/lib/libvcc/vcc_parse.c
@@ -160,7 +160,7 @@ vcc_Compound(struct vcc *tl)
 			vcc_NextToken(tl);
 			tl->indent -= INDENT;
 			Fb(tl, 1, "}\n");
-			break;
+			return;
 		case CSRC:
 			if (tl->allow_inline_c) {
 				Fb(tl, 1, "%.*s\n",
@@ -177,31 +177,33 @@ vcc_Compound(struct vcc *tl)
 			VSB_printf(tl->sb,
 			    "End of input while in compound statement\n");
 			tl->err = 1;
-			break;
+			return;
 		case ID:
 			sym = VCC_SymbolGet(tl, SYM_NONE, SYMTAB_NOERR,
 			    XREF_NONE);
 			if (sym == NULL) {
 				VSB_printf(tl->sb, "Symbol not found.\n");
 				vcc_ErrWhere(tl, tl->t);
-			} else if (sym->action == NULL) {
+				return;
+			}
+			if (sym->action == NULL) {
 				VSB_printf(tl->sb,
 				    "Symbol cannot be used here.\n");
 				vcc_ErrWhere(tl, tl->t);
-			} else {
-				if (sym->action_mask != 0)
-					vcc_AddUses(tl, t, NULL,
-					    sym->action_mask,
-					    "Not a valid action");
-				sym->action(tl, t, sym);
+				return;
 			}
+			if (sym->action_mask != 0)
+				vcc_AddUses(tl, t, NULL,
+				    sym->action_mask,
+				    "Not a valid action");
+			sym->action(tl, t, sym);
 			break;
 		default:
 			/* We deliberately do not mention inline C */
 			VSB_printf(tl->sb,
 			    "Expected an action, 'if', '{' or '}'\n");
 			vcc_ErrWhere(tl, tl->t);
-			break;
+			return;
 		}
 		Fb(tl, 1, "if (*ctx->handling) return;\n");
 	}


More information about the varnish-commit mailing list