aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocator.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-04-27 17:26:41 +0200
committerMattias Andrée <maandree@kth.se>2016-04-27 17:26:44 +0200
commit5e29d29416b568f380a2ab753e3e77e96af4b094 (patch)
tree7e89a8d4f064c36c9dd5ec34bf963b6e60d0b4f4 /src/allocator.c
parentAdd option UNSAFE which disables all internal error checks (diff)
downloadlibzahl-5e29d29416b568f380a2ab753e3e77e96af4b094.tar.gz
libzahl-5e29d29416b568f380a2ab753e3e77e96af4b094.tar.bz2
libzahl-5e29d29416b568f380a2ab753e3e77e96af4b094.tar.xz
Error-check implies unlikely branching
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 1a2d505..4f81171 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -22,7 +22,7 @@ libzahl_realloc(z_t a, size_t need)
a->chars = new;
} else {
a->chars = realloc(a->chars, new_size * sizeof(zahl_char_t));
- if (check(unlikely(!a->chars)))
+ if (check(!a->chars))
libzahl_memfailure();
}
a->alloced = new_size;