aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocator.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-05-07 03:02:56 +0200
committerMattias Andrée <maandree@kth.se>2016-05-07 03:02:56 +0200
commitfdc75a358e4c20116640c08f4e8ce7a09dc3cebd (patch)
treeca67767e06b0dd9d734dc027bb02a4a47681241e /src/allocator.c
parentMake zdiv and zmod (calls zdivmod) inline (diff)
downloadlibzahl-fdc75a358e4c20116640c08f4e8ce7a09dc3cebd.tar.gz
libzahl-fdc75a358e4c20116640c08f4e8ce7a09dc3cebd.tar.bz2
libzahl-fdc75a358e4c20116640c08f4e8ce7a09dc3cebd.tar.xz
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 4f81171..d03ff17 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -21,7 +21,7 @@ libzahl_realloc(z_t a, size_t need)
zfree(a);
a->chars = new;
} else {
- a->chars = realloc(a->chars, new_size * sizeof(zahl_char_t));
+ a->chars = realloc(a->chars, (new_size + ZAHL_FLUFF) * sizeof(zahl_char_t));
if (check(!a->chars))
libzahl_memfailure();
}