collapse if, also to avoid braces warning

This commit is contained in:
tg 2016-03-01 20:28:33 +00:00
parent 85c377dfc2
commit fdfd7a2ab8
1 changed files with 3 additions and 4 deletions

7
var.c
View File

@ -28,7 +28,7 @@
#include <sys/sysctl.h>
#endif
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.200 2016/03/01 20:06:15 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.201 2016/03/01 20:28:33 tg Exp $");
/*-
* Variables
@ -833,9 +833,8 @@ typeset(const char *var, uint32_t set, uint32_t clr, int field, int base)
if (!(c = (unsigned char)qval[0]))
goto nameref_empty;
else if (ksh_isdigit(c))
if (getn(qval, &c))
goto nameref_rhs_checked;
else if (ksh_isdigit(c) && getn(qval, &c))
goto nameref_rhs_checked;
else if (qval[1] == '\0') switch (c) {
case '$':
case '!':