aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-05-22 21:33:03 +0530
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-05-22 21:33:03 +0530
commit96be12b185d8ecc294b02afa1622521968f37c16 (patch)
tree07ba098ac89dd12745e0118a244bf38efee9315b /util.c
parentd6b26ca37d23b233eb288205a2b6808741f4b00e (diff)
parent061e9fe9a7db396c0c4f3d996c3908fb43a6d50c (diff)
downloaddwm-96be12b185d8ecc294b02afa1622521968f37c16.tar.gz
dwm-96be12b185d8ecc294b02afa1622521968f37c16.tar.bz2
dwm-96be12b185d8ecc294b02afa1622521968f37c16.zip
Merge upstream release '6.5'
Diffstat (limited to 'util.c')
-rw-r--r--util.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/util.c b/util.c
index fe044fc..96b82c9 100644
--- a/util.c
+++ b/util.c
@@ -6,18 +6,9 @@
#include "util.h"
-void *
-ecalloc(size_t nmemb, size_t size)
-{
- void *p;
-
- if (!(p = calloc(nmemb, size)))
- die("calloc:");
- return p;
-}
-
void
-die(const char *fmt, ...) {
+die(const char *fmt, ...)
+{
va_list ap;
va_start(ap, fmt);
@@ -33,3 +24,13 @@ die(const char *fmt, ...) {
exit(1);
}
+
+void *
+ecalloc(size_t nmemb, size_t size)
+{
+ void *p;
+
+ if (!(p = calloc(nmemb, size)))
+ die("calloc:");
+ return p;
+}