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"
__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
@ -1213,8 +1213,7 @@ varsub(Expand *xp, const char *sp, const char *word,
}
/* POSIX 2009? */
zero_ok = true;
} else {
if ((p = cstrchr(sp, '[')) && (p[1] == '*' || p[1] == '@') &&
} else if ((p = cstrchr(sp, '[')) && (p[1] == '*' || p[1] == '@') &&
p[2] == ']') {
XPtrV wv;
@ -1274,7 +1273,6 @@ varsub(Expand *xp, const char *sp, const char *word,
}
state = XSUB;
}
}
c = stype & 0x7F;
/* test the compiler's code generator */