about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-08-08 10:43:09 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-08-08 10:43:09 +0200
commite0dee911455cee739a5b05a994828f4a37a2764d (patch)
treebd2adce4d88214ad679c02a71077bb73e39e8c49
parent5e76e7e21da042c493c59235ca82d7275f20a7e4 (diff)
downloaddwm-e0dee911455cee739a5b05a994828f4a37a2764d.tar.gz
sync code-style patch from libsl
-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;
+}