get rid of tempting sizeofN macro

This commit is contained in:
tg
2008-11-12 00:55:32 +00:00
parent 4d3fc2413e
commit 8d5d720f08
2 changed files with 3 additions and 4 deletions

4
exec.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.46 2008/11/12 00:54:47 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.47 2008/11/12 00:55:31 tg Exp $");
static int comexec(struct op *, struct tbl *volatile, const char **,
int volatile);
@ -74,7 +74,7 @@ execute(struct op *volatile t,
if (t->ioact != NULL || t->type == TPIPE || t->type == TCOPROC) {
e->savefd = alloc(NUFILE, sizeof (short), ATEMP);
/* initialise to not redirected */
memset(e->savefd, 0, sizeofN(short, NUFILE));
memset(e->savefd, 0, NUFILE * sizeof (short));
}
/* do redirection, to be restored in quitenv() */