add a few assertions for LLVM+Clang 3.2 scan-build; no !DEBUG changes

This commit is contained in:
tg
2012-12-08 18:30:31 +00:00
parent c4e88acd83
commit 0780070d24
5 changed files with 55 additions and 6 deletions

4
var.c
View File

@ -27,7 +27,7 @@
#include <sys/sysctl.h>
#endif
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.164 2012/12/04 01:18:34 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.165 2012/12/08 18:30:31 tg Exp $");
/*-
* Variables
@ -673,6 +673,8 @@ exportprep(struct tbl *vp, const char *val)
char *op = (vp->flag&ALLOC) ? vp->val.s : NULL;
size_t namelen, vallen;
mkssert(val != NULL);
namelen = strlen(vp->name);
vallen = strlen(val) + 1;