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
edit.c
View File

@ -28,7 +28,7 @@
#ifndef MKSH_NO_CMDLINE_EDITING
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.257 2012/12/01 01:36:19 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.258 2012/12/04 01:18:26 tg Exp $");
/*
* in later versions we might use libtermcap for this, but since external
@ -2273,6 +2273,7 @@ x_push(int nchars)
{
char *cp;
mkssert(xcp != NULL);
strndupx(cp, xcp, nchars, AEDIT);
if (killstack[killsp])
afree(killstack[killsp], AEDIT);