sync code-style patch from libsl
authorHiltjo Posthuma <hiltjo@codemadness.org>
Mon, 8 Aug 2022 08:43:09 +0000 (10:43 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Mon, 8 Aug 2022 08:43:09 +0000 (10:43 +0200)
util.c

diff --git a/util.c b/util.c
index fe044fc7b7978d1f3c23768e315aae415d90b11a..96b82c980c4ce304d329fc60e582379ab0400993 100644 (file)
--- 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;
+}