summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.c b/util.c
index 9b27512..6b703e9 100644
--- a/util.c
+++ b/util.c
@@ -6,6 +6,16 @@
#include "util.h"
+void *
+ecalloc(size_t nmemb, size_t size)
+{
+ void *p;
+
+ if (!(p = calloc(nmemb, size)))
+ perror(NULL);
+ return p;
+}
+
void
die(const char *fmt, ...) {
va_list ap;