[PATCH 4/7] ash: remove superfluous code in arithmetic mode

Ron Yorston rmy at frippery.org
Fri May 15 10:33:22 UTC 2015


Based on commits 1a74845, cfc3d6a and ff13779 from
git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu

Signed-off-by: Ron Yorston <rmy at pobox.com>
---
 shell/ash.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/shell/ash.c b/shell/ash.c
index d87166c..ee7642a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11282,9 +11282,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
 			goto quotemark;
 		case CENDQUOTE:
 			IF_ASH_BASH_COMPAT(bash_dollar_squote = 0;)
-			if (eofmark != NULL && arinest == 0
-			 && varnest == 0
-			) {
+			if (eofmark != NULL && varnest == 0) {
 				USTPUTC(c, out);
 			} else {
 				if (dqvarnest == 0) {
@@ -11320,7 +11318,6 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
 				if (pgetc() == ')') {
 					if (--arinest == 0) {
 						syntax = prevsyntax;
-						dblquote = (syntax == DQSYNTAX);
 						c = CTLENDARI;
 					}
 				} else {
@@ -11645,7 +11642,7 @@ parsesub: {
 		((unsigned char *)stackblock())[typeloc] = subtype | flags;
 		if (subtype != VSNORMAL) {
 			varnest++;
-			if (dblquote || arinest) {
+			if (dblquote) {
 				dqvarnest++;
 			}
 		}
-- 
2.1.0



More information about the busybox mailing list