diff options
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,4 @@ | |||
| 1 | /* | 1 | /* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
| 2 | * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | ||
| 3 | * See LICENSE file for license details. | 2 | * See LICENSE file for license details. |
| 4 | */ | 3 | */ |
| 5 | #include "dwm.h" | 4 | #include "dwm.h" |
| @@ -33,6 +32,7 @@ eprint(const char *errstr, ...) { | |||
| 33 | void * | 32 | void * |
| 34 | erealloc(void *ptr, unsigned int size) { | 33 | erealloc(void *ptr, unsigned int size) { |
| 35 | void *res = realloc(ptr, size); | 34 | void *res = realloc(ptr, size); |
| 35 | |||
| 36 | if(!res) | 36 | if(!res) |
| 37 | eprint("fatal: could not malloc() %u bytes\n", size); | 37 | eprint("fatal: could not malloc() %u bytes\n", size); |
| 38 | return res; | 38 | return res; |
| @@ -44,7 +44,6 @@ spawn(Arg *arg) { | |||
| 44 | 44 | ||
| 45 | if(!shell && !(shell = getenv("SHELL"))) | 45 | if(!shell && !(shell = getenv("SHELL"))) |
| 46 | shell = "/bin/sh"; | 46 | shell = "/bin/sh"; |
| 47 | |||
| 48 | if(!arg->cmd) | 47 | if(!arg->cmd) |
| 49 | return; | 48 | return; |
| 50 | /* The double-fork construct avoids zombie processes and keeps the code | 49 | /* The double-fork construct avoids zombie processes and keeps the code |
