From 897b98ba4dacb02edc3c8775f207a9c9a25fc1e4 Mon Sep 17 00:00:00 2001 From: Ondřej Bílka Date: Thu, 28 Nov 2013 12:03:28 +0100 Subject: Make memset in calloc a tail call. --- malloc/malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'malloc/malloc.c') diff --git a/malloc/malloc.c b/malloc/malloc.c index c8a5374e65..8977687f8c 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -3181,7 +3181,7 @@ __libc_calloc(size_t n, size_t elem_size) if (chunk_is_mmapped (p)) { if (__builtin_expect (perturb_byte, 0)) - MALLOC_ZERO (mem, sz); + return MALLOC_ZERO (mem, sz); return mem; } @@ -3203,7 +3203,7 @@ __libc_calloc(size_t n, size_t elem_size) assert(nclears >= 3); if (nclears > 9) - MALLOC_ZERO(d, clearsize); + return MALLOC_ZERO(d, clearsize); else { *(d+0) = 0; -- cgit 1.4.1