aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util.c b/util.c
index d0444c5..b4b163a 100644
--- a/util.c
+++ b/util.c
@@ -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) {
22void * 21void *
23emalloc(unsigned int size) { 22emalloc(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, ...) {
40char * 40char *
41estrdup(const char *str) { 41estrdup(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;