aboutsummaryrefslogtreecommitdiff
path: root/src/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem.c')
-rw-r--r--src/mem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mem.c b/src/mem.c
index 4312308..744671e 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -21,6 +21,15 @@ emalloc(size_t s)
}
void *
+ecalloc(size_t n, size_t s)
+{
+ void *p = calloc(n, s);
+ if (!p)
+ emalloc_die();
+ return p;
+}
+
+void *
e2nrealloc(void *p, size_t *pn, size_t s)
{
char *n = json_2nrealloc(p, pn, s);

Return to:

Send suggestions and report system problems to the System administrator.