ash: small code shrink (-21 bytes)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
f7a8433535
commit
0ff78a0166
15
shell/ash.c
15
shell/ash.c
@ -11146,10 +11146,9 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
|
|||||||
if (dqvarnest > 0) {
|
if (dqvarnest > 0) {
|
||||||
dqvarnest--;
|
dqvarnest--;
|
||||||
}
|
}
|
||||||
USTPUTC(CTLENDVAR, out);
|
c = CTLENDVAR;
|
||||||
} else {
|
|
||||||
USTPUTC(c, out);
|
|
||||||
}
|
}
|
||||||
|
USTPUTC(c, out);
|
||||||
break;
|
break;
|
||||||
#if ENABLE_SH_MATH_SUPPORT
|
#if ENABLE_SH_MATH_SUPPORT
|
||||||
case CLP: /* '(' in arithmetic */
|
case CLP: /* '(' in arithmetic */
|
||||||
@ -11158,25 +11157,23 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
|
|||||||
break;
|
break;
|
||||||
case CRP: /* ')' in arithmetic */
|
case CRP: /* ')' in arithmetic */
|
||||||
if (parenlevel > 0) {
|
if (parenlevel > 0) {
|
||||||
USTPUTC(c, out);
|
parenlevel--;
|
||||||
--parenlevel;
|
|
||||||
} else {
|
} else {
|
||||||
if (pgetc() == ')') {
|
if (pgetc() == ')') {
|
||||||
if (--arinest == 0) {
|
if (--arinest == 0) {
|
||||||
USTPUTC(CTLENDARI, out);
|
|
||||||
syntax = prevsyntax;
|
syntax = prevsyntax;
|
||||||
dblquote = (syntax == DQSYNTAX);
|
dblquote = (syntax == DQSYNTAX);
|
||||||
} else
|
c = CTLENDARI;
|
||||||
USTPUTC(')', out);
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* unbalanced parens
|
* unbalanced parens
|
||||||
* (don't 2nd guess - no error)
|
* (don't 2nd guess - no error)
|
||||||
*/
|
*/
|
||||||
pungetc();
|
pungetc();
|
||||||
USTPUTC(')', out);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
USTPUTC(c, out);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case CBQUOTE: /* '`' */
|
case CBQUOTE: /* '`' */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user