summaryrefslogtreecommitdiffstats
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r--common/dlmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 7ad368ee53..b4341fef54 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1750,11 +1750,11 @@ void *calloc(size_t n, size_t elem_size)
mchunkptr oldtop = top;
INTERNAL_SIZE_T oldtopsize = chunksize(top);
- void *mem = malloc(sz);
-
if ((long)n < 0)
return NULL;
+ void *mem = malloc(sz);
+
if (!mem)
return NULL;
else {