summaryrefslogtreecommitdiff
path: root/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.c')
-rw-r--r--lib/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/util.c b/lib/util.c
index f766d59e3..cecd58253 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -43,6 +43,12 @@ xcalloc(size_t count, size_t size)
}
void *
+xzalloc(size_t size)
+{
+ return xcalloc(1, size);
+}
+
+void *
xmalloc(size_t size)
{
void *p = malloc(size ? size : 1);