collapse uselessly nested if

This commit is contained in:
tg 2016-05-05 22:19:04 +00:00
parent 370b3e6008
commit b6e438037f

6
eval.c
View File

@ -23,7 +23,7 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.185 2016/02/26 19:05:21 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/eval.c,v 1.186 2016/05/05 22:19:04 tg Exp $");
/* /*
* string expansion * string expansion
@ -1213,8 +1213,7 @@ varsub(Expand *xp, const char *sp, const char *word,
} }
/* POSIX 2009? */ /* POSIX 2009? */
zero_ok = true; zero_ok = true;
} else { } else if ((p = cstrchr(sp, '[')) && (p[1] == '*' || p[1] == '@') &&
if ((p = cstrchr(sp, '[')) && (p[1] == '*' || p[1] == '@') &&
p[2] == ']') { p[2] == ']') {
XPtrV wv; XPtrV wv;
@ -1274,7 +1273,6 @@ varsub(Expand *xp, const char *sp, const char *word,
} }
state = XSUB; state = XSUB;
} }
}
c = stype & 0x7F; c = stype & 0x7F;
/* test the compiler's code generator */ /* test the compiler's code generator */