X-Git-Url: https://git.danieliu.xyz/?p=dmenu.git;a=blobdiff_plain;f=util.c;fp=util.c;h=d0444c552d68202d20ff8d8fe4514cd71abe8691;hp=0e8828cf238072e9bc4cd8641c626c7e1e86074e;hb=81bcf078f6c510314f140471efb8952160fdb3ad;hpb=0e5f467aa85e318ed27fc5d6d3826426a06ef3c3 diff --git a/util.c b/util.c index 0e8828c..d0444c5 100644 --- a/util.c +++ b/util.c @@ -13,16 +13,14 @@ /* static */ static void -badmalloc(unsigned int size) -{ +badmalloc(unsigned int size) { eprint("fatal: could not malloc() %u bytes\n", size); } /* extern */ void * -emalloc(unsigned int size) -{ +emalloc(unsigned int size) { void *res = malloc(size); if(!res) badmalloc(size); @@ -30,8 +28,7 @@ emalloc(unsigned int size) } void -eprint(const char *errstr, ...) -{ +eprint(const char *errstr, ...) { va_list ap; va_start(ap, errstr); @@ -41,8 +38,7 @@ eprint(const char *errstr, ...) } char * -estrdup(const char *str) -{ +estrdup(const char *str) { void *res = strdup(str); if(!res) badmalloc(strlen(str));