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

5
var.c
View File

@ -28,7 +28,7 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #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 * Variables
@ -833,8 +833,7 @@ typeset(const char *var, uint32_t set, uint32_t clr, int field, int base)
if (!(c = (unsigned char)qval[0])) if (!(c = (unsigned char)qval[0]))
goto nameref_empty; goto nameref_empty;
else if (ksh_isdigit(c)) else if (ksh_isdigit(c) && getn(qval, &c))
if (getn(qval, &c))
goto nameref_rhs_checked; goto nameref_rhs_checked;
else if (qval[1] == '\0') switch (c) { else if (qval[1] == '\0') switch (c) {
case '$': case '$':