From aff09967d194d062ae8d83c0fbe1edf158804ef9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 4 Mar 2016 10:45:10 +0100 Subject: Clean up, fix a few bugs, and add a test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/zrsh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/zrsh.c') diff --git a/src/zrsh.c b/src/zrsh.c index c3bd63e..c5a1a05 100644 --- a/src/zrsh.c +++ b/src/zrsh.c @@ -27,8 +27,7 @@ zrsh(z_t a, z_t b, size_t bits) zmemmove(a->chars, a->chars + chars, a->used); } else if (a != b) { a->used = b->used - chars; - if (a->alloced < a->used) - zahl_realloc(a, a->used); + ENSURE_SIZE(a, a->used); zmemcpy(a->chars, b->chars + chars, a->used); } -- cgit v1.2.3-70-g09d2