summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-07 03:37:07 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-07 03:37:07 +0530
commitaeb112325685e85c9d03d9333e68c66b20dc0f43 (patch)
tree896b956c4d9170460059a43cb93d768b9d495c5f /util.c
parentd2cb1d60c7eedb2b339221318c993ba35789eecf (diff)
Upgrading to dwm-6.4
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;
+}