summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-05-05 00:52:35 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-05-05 00:52:35 +0200
commitaa0d4fb092382f4fb8f1691434c9c3c1cb8b108b (patch)
treefd919a60b9b179a11cea218c84546027b827c5d5 /util.c
parentc4ef99224db89696eb8fc96df24883ffa89880f9 (diff)
Bump to 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;
+}