diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 3 insertions, 2 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 "dmenu.h" | 4 | #include "dmenu.h" |
@@ -22,6 +21,7 @@ badmalloc(unsigned int size) { | |||
22 | void * | 21 | void * |
23 | emalloc(unsigned int size) { | 22 | emalloc(unsigned int size) { |
24 | void *res = malloc(size); | 23 | void *res = malloc(size); |
24 | |||
25 | if(!res) | 25 | if(!res) |
26 | badmalloc(size); | 26 | badmalloc(size); |
27 | return res; | 27 | return res; |
@@ -40,6 +40,7 @@ eprint(const char *errstr, ...) { | |||
40 | char * | 40 | char * |
41 | estrdup(const char *str) { | 41 | estrdup(const char *str) { |
42 | void *res = strdup(str); | 42 | void *res = strdup(str); |
43 | |||
43 | if(!res) | 44 | if(!res) |
44 | badmalloc(strlen(str)); | 45 | badmalloc(strlen(str)); |
45 | return res; | 46 | return res; |