aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-08-30 15:20:07 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-08-30 15:20:07 +0200
commit0ff78a0166b284215a15a41e82e200301fb45f1e (patch)
treeba41c77594cabcdf1c516d3d67fb2ba3a3796666
parentf7a8433535b7072b61acf31d97dab7da1d4b140b (diff)
downloadbusybox-w32-0ff78a0166b284215a15a41e82e200301fb45f1e.tar.gz
busybox-w32-0ff78a0166b284215a15a41e82e200301fb45f1e.tar.bz2
busybox-w32-0ff78a0166b284215a15a41e82e200301fb45f1e.zip
ash: small code shrink (-21 bytes)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--shell/ash.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/shell/ash.c b/shell/ash.c
index c8e7e3b06..921367be5 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11146,10 +11146,9 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
11146 if (dqvarnest > 0) { 11146 if (dqvarnest > 0) {
11147 dqvarnest--; 11147 dqvarnest--;
11148 } 11148 }
11149 USTPUTC(CTLENDVAR, out); 11149 c = CTLENDVAR;
11150 } else {
11151 USTPUTC(c, out);
11152 } 11150 }
11151 USTPUTC(c, out);
11153 break; 11152 break;
11154#if ENABLE_SH_MATH_SUPPORT 11153#if ENABLE_SH_MATH_SUPPORT
11155 case CLP: /* '(' in arithmetic */ 11154 case CLP: /* '(' in arithmetic */
@@ -11158,25 +11157,23 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
11158 break; 11157 break;
11159 case CRP: /* ')' in arithmetic */ 11158 case CRP: /* ')' in arithmetic */
11160 if (parenlevel > 0) { 11159 if (parenlevel > 0) {
11161 USTPUTC(c, out); 11160 parenlevel--;
11162 --parenlevel;
11163 } else { 11161 } else {
11164 if (pgetc() == ')') { 11162 if (pgetc() == ')') {
11165 if (--arinest == 0) { 11163 if (--arinest == 0) {
11166 USTPUTC(CTLENDARI, out);
11167 syntax = prevsyntax; 11164 syntax = prevsyntax;
11168 dblquote = (syntax == DQSYNTAX); 11165 dblquote = (syntax == DQSYNTAX);
11169 } else 11166 c = CTLENDARI;
11170 USTPUTC(')', out); 11167 }
11171 } else { 11168 } else {
11172 /* 11169 /*
11173 * unbalanced parens 11170 * unbalanced parens
11174 * (don't 2nd guess - no error) 11171 * (don't 2nd guess - no error)
11175 */ 11172 */
11176 pungetc(); 11173 pungetc();
11177 USTPUTC(')', out);
11178 } 11174 }
11179 } 11175 }
11176 USTPUTC(c, out);
11180 break; 11177 break;
11181#endif 11178#endif
11182 case CBQUOTE: /* '`' */ 11179 case CBQUOTE: /* '`' */