Add assertions and shuffle code around for LLVM+Clang scan-build.

This commit is contained in:
tg
2012-12-04 01:18:34 +00:00
parent 68c4dae6ef
commit cf807eb83a
9 changed files with 46 additions and 27 deletions

3
misc.c
View File

@ -30,7 +30,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.202 2012/12/04 01:12:11 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.203 2012/12/04 01:18:31 tg Exp $");
#define KSH_CHVT_FLAG
#ifdef MKSH_SMALL
@ -445,6 +445,7 @@ parse_args(const char **argv,
if (arrayset) {
const char *ccp = NULL;
mkssert(array != NULL);
if (*array)
ccp = skip_varname(array, false);
if (!ccp || !(!ccp[0] || (ccp[0] == '+' && !ccp[1]))) {