summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.c b/util.c
index 4cc748f0..2414b394 100644
--- a/util.c
+++ b/util.c
@@ -40,6 +40,15 @@ eprint(const char *errstr, ...)
exit(EXIT_FAILURE);
}
+void *
+erealloc(void *ptr, unsigned int size)
+{
+ void *res = realloc(ptr, size);
+ if(!res)
+ bad_malloc(size);
+ return res;
+}
+
void
spawn(Arg *arg)
{