summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAndrew Guschin <guschin.drew@gmail.com>2023-05-24 19:42:32 +0400
committerAndrew Guschin <guschin@altlinux.org>2023-07-27 21:25:25 +0400
commit5a7792579bbe1c1b443682d9924a1929e7acd555 (patch)
treef831b4412c0b071cba4a05ca6c50d7dbdbbd058e /util.c
parente3344f703551d81b4841f3f7bd444c5c30b18688 (diff)
Bump to v6.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;
+}