diff options
author | jilles <jilles@FreeBSD.org> | 2016-04-13 20:32:35 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2016-04-13 20:32:35 +0000 |
commit | b36a210f0fb8a41af16ffc3a14c74ac0d6349f42 (patch) | |
tree | 79928851cbae8fc92fd57d3eaa36dd59b3c24c59 /bin | |
parent | 3c6ae3fb05a79f8cccffae6efea7a746507cc655 (diff) | |
download | FreeBSD-src-b36a210f0fb8a41af16ffc3a14c74ac0d6349f42.zip FreeBSD-src-b36a210f0fb8a41af16ffc3a14c74ac0d6349f42.tar.gz |
sh: Simplify code by removing variable bracketed_name.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/parser.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 3f9732c..e72a6f1 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 @@ varname: flags |= VSLINENO; } } else if (is_digit(c)) { - if (bracketed_name) { + if (subtype != VSNORMAL) { do { STPUTC(c, out); c = pgetc_linecont(); |