• alloc() can’t fail, afree() can take NULL

‣ macro afreechk() is superfluous
• get rid of macro afreechv() by re-doing the “don’t leak that much” code
• some KNF (mostly, whitespace and 80c) while here
This commit is contained in:
tg
2008-05-17 18:47:03 +00:00
parent b41a72ac2e
commit f17b8b1c8b
14 changed files with 77 additions and 93 deletions

View File

@ -3,7 +3,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.61 2008/04/19 17:21:53 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.62 2008/05/17 18:46:59 tg Exp $");
/*-
* MirOS: This is the default mapping type, and need not be specified.
@ -554,7 +554,7 @@ init_histvec(void)
{
if (history == (char **)NULL) {
histsize = HISTORYSIZE;
history = (char **)alloc(histsize*sizeof (char *), APERM);
history = (char **)alloc(histsize * sizeof (char *), APERM);
histptr = history - 1;
}
}