diff options
author | arg@10ksloc.org | 2006-07-20 12:18:06 +0200 |
---|---|---|
committer | arg@10ksloc.org | 2006-07-20 12:18:06 +0200 |
commit | 3bf208530f9fcb9552ea5787d2b20b5756a7ac72 (patch) | |
tree | c70a08b2e6b3a22346ec559ad604d895886a6dc9 /util.c | |
parent | 5f147cb5c10d757831fdc9754a593a4d9f13669a (diff) | |
download | aur-3bf208530f9fcb9552ea5787d2b20b5756a7ac72.tar.gz |
cleaned up code
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |