From b2c44d8c961090c2773f3a98d12fcafc7f5c5b2b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 14 Mar 2016 17:56:37 +0100 Subject: Mostly optimisations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/allocator.c') 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); -- cgit v1.2.3-70-g09d2