cleaned up code

This commit is contained in:
arg@10ksloc.org
2006-07-20 12:18:06 +02:00
parent fe3756c8e1
commit dc5d967ee6
8 changed files with 78 additions and 85 deletions

3
util.c

@ -26,6 +26,7 @@ void *
emallocz(unsigned int size)
{
void *res = calloc(1, size);
if(!res)
bad_malloc(size);
return res;
@ -34,6 +35,7 @@ emallocz(unsigned int size)
void
eprint(const char *errstr, ...) {
va_list ap;
va_start(ap, errstr);
vfprintf(stderr, errstr, ap);
va_end(ap);
@ -44,6 +46,7 @@ void
spawn(Arg *arg)
{
char **argv = (char **)arg->argv;
if(!argv || !argv[0])
return;
if(fork() == 0) {