summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.c b/util.c
index 1e36b25..94590f9 100644
--- a/util.c
+++ b/util.c
@@ -26,6 +26,7 @@ void *
26emallocz(unsigned int size) 26emallocz(unsigned int size)
27{ 27{
28 void *res = calloc(1, size); 28 void *res = calloc(1, size);
29
29 if(!res) 30 if(!res)
30 bad_malloc(size); 31 bad_malloc(size);
31 return res; 32 return res;
@@ -34,6 +35,7 @@ emallocz(unsigned int size)
34void 35void
35eprint(const char *errstr, ...) { 36eprint(const char *errstr, ...) {
36 va_list ap; 37 va_list ap;
38
37 va_start(ap, errstr); 39 va_start(ap, errstr);
38 vfprintf(stderr, errstr, ap); 40 vfprintf(stderr, errstr, ap);
39 va_end(ap); 41 va_end(ap);
@@ -44,6 +46,7 @@ void
44spawn(Arg *arg) 46spawn(Arg *arg)
45{ 47{
46 char **argv = (char **)arg->argv; 48 char **argv = (char **)arg->argv;
49
47 if(!argv || !argv[0]) 50 if(!argv || !argv[0])
48 return; 51 return;
49 if(fork() == 0) { 52 if(fork() == 0) {