From d72505899b0caf6da985c4153e992604001f6c60 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 13 Apr 2016 20:32:35 +0000 Subject: [PATCH] sh: Simplify code by removing variable bracketed_name. --- bin/sh/parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 3f9732cbbff3..e72a6f1c7e2e 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1616,7 +1616,6 @@ parsesub: { int flags; char *p; static const char types[] = "}-+?="; - int bracketed_name = 0; /* used to handle ${[0-9]*} variables */ int linno; int length; int c1; @@ -1640,7 +1639,6 @@ parsesub: { subtype = VSNORMAL; flags = 0; if (c == '{') { - bracketed_name = 1; c = pgetc_linecont(); subtype = 0; } @@ -1665,7 +1663,7 @@ parsesub: { flags |= VSLINENO; } } else if (is_digit(c)) { - if (bracketed_name) { + if (subtype != VSNORMAL) { do { STPUTC(c, out); c = pgetc_linecont();