aewl

diff util.c @ 123:61490330e90a

cleaned up code
author arg@10ksloc.org
date Thu, 20 Jul 2006 12:18:06 +0200
parents 4bee0aa5b286
children c1185dc7a36e
line diff
     1.1 --- a/util.c	Thu Jul 20 10:48:22 2006 +0200
     1.2 +++ b/util.c	Thu Jul 20 12:18:06 2006 +0200
     1.3 @@ -26,6 +26,7 @@
     1.4  emallocz(unsigned int size)
     1.5  {
     1.6  	void *res = calloc(1, size);
     1.7 +
     1.8  	if(!res)
     1.9  		bad_malloc(size);
    1.10  	return res;
    1.11 @@ -34,6 +35,7 @@
    1.12  void
    1.13  eprint(const char *errstr, ...) {
    1.14  	va_list ap;
    1.15 +
    1.16  	va_start(ap, errstr);
    1.17  	vfprintf(stderr, errstr, ap);
    1.18  	va_end(ap);
    1.19 @@ -44,6 +46,7 @@
    1.20  spawn(Arg *arg)
    1.21  {
    1.22  	char **argv = (char **)arg->argv;
    1.23 +
    1.24  	if(!argv || !argv[0])
    1.25  		return;
    1.26  	if(fork() == 0) {