aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocator.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-14 17:56:37 +0100
committerMattias Andrée <maandree@kth.se>2016-03-14 17:56:37 +0100
commitb2c44d8c961090c2773f3a98d12fcafc7f5c5b2b (patch)
tree8d7d19fd6ebd768023b3030d3e7b69d985fbf1c5 /src/allocator.c
parentFix so that no workaround is required. (diff)
downloadlibzahl-b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b.tar.gz
libzahl-b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b.tar.bz2
libzahl-b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b.tar.xz
Mostly optimisations
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/allocator.c')
-rw-r--r--src/allocator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/allocator.c b/src/allocator.c
index 44f7985..7737046 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -28,7 +28,7 @@ libzahl_realloc(z_t a, size_t need)
a->chars = new;
} else {
a->chars = realloc(a->chars, need * sizeof(zahl_char_t));
- if (!a->chars) {
+ if (unlikely(!a->chars)) {
if (!errno) /* sigh... */
errno = ENOMEM;
libzahl_failure(errno);