get rid of tempting sizeofN macro
This commit is contained in:
parent
4d3fc2413e
commit
8d5d720f08
4
exec.c
4
exec.c
@ -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() */
|
||||
|
3
sh.h
3
sh.h
@ -103,7 +103,7 @@
|
||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.255 2008/11/12 00:54:50 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.256 2008/11/12 00:55:32 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R36 2008/11/10"
|
||||
|
||||
@ -255,7 +255,6 @@ extern int __cdecl setegid(gid_t);
|
||||
#endif
|
||||
|
||||
#define NELEM(a) (sizeof (a) / sizeof ((a)[0]))
|
||||
#define sizeofN(typ, n) (sizeof (typ) * (n))
|
||||
#define BIT(i) (1 << (i)) /* define bit in flag */
|
||||
|
||||
/* Table flag type - needs > 16 and < 32 bits */
|
||||
|
Loading…
x
Reference in New Issue
Block a user