aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/allocator.c')
-rw-r--r--src/allocator.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/allocator.c b/src/allocator.c
index 80668f1..10170ae 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -22,11 +22,8 @@ libzahl_realloc(z_t a, size_t need)
a->chars = new;
} else {
a->chars = realloc(a->chars, new_size * sizeof(zahl_char_t));
- if (unlikely(!a->chars)) {
- if (!errno) /* sigh... */
- errno = ENOMEM;
- libzahl_failure(errno);
- }
+ if (unlikely(!a->chars))
+ libzahl_memfailure();
}
a->alloced = new_size;
}