fiss-minit

A standalone service supervisor based on minit
Log | Files | Refs | README | LICENSE

commit 27e88079c9ed4ba5f19ed4eae04d0c56319bc0c4
parent 7d1795f86844ed99814b39a3830149ff147fe9e3
Author: leitner <leitner>
Date:   Thu, 24 Feb 2005 09:10:08 +0000

malloc -> alloca

Diffstat:
MCHANGES | 2++
Mminit.c | 4++--
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGES b/CHANGES @@ -24,6 +24,8 @@ add serdo (execute batch, no shell features whatsoever) make "msvc servicename" output easier to parse if not outputting to a tty require libowfat instead of shipping half of it ourselves + replace malloc with alloca; minit is now 6644 bytes on i386. + 0.9.1: fix embarassing typo in msvc (Gelu G. Lupas) diff --git a/minit.c b/minit.c @@ -201,10 +201,10 @@ again: argv=split(s,'\n',&argc,2,1); if (argv[argc-1]) argv[argc-1]=0; else argv[argc]=0; } else { - argv=(char**)malloc(2*sizeof(char*)); + argv=(char**)alloca(2*sizeof(char*)); argv[1]=0; } - argv0=(char*)malloc(PATH_MAX+1); + argv0=(char*)alloca(PATH_MAX+1); if (!argv || !argv0) _exit(1); if (readlink("run",argv0,PATH_MAX)<0) { if (errno!=EINVAL) _exit(1); /* not a symbolic link */