summaryrefslogtreecommitdiff
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
authorkarl.beldan@gmail.com <karl.beldan@gmail.com>2010-04-06 22:18:08 +0200
committerWolfgang Denk <wd@denx.de>2010-04-10 00:30:27 +0200
commitae30b8c200dc071d719ad649d0bf5635d61754f3 (patch)
tree254147562017a421b91f49c9130fbd27781d54a7 /common/dlmalloc.c
parenta2513e27e8df2b7bf481d03e7719f91ce19e89d5 (diff)
downloadu-boot-ae30b8c200dc071d719ad649d0bf5635d61754f3.tar.gz
malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r--common/dlmalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 205fc40ac8..2276532da7 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1515,7 +1515,7 @@ void *sbrk(ptrdiff_t increment)
ulong new = old + increment;
if ((new < mem_malloc_start) || (new > mem_malloc_end))
- return NULL;
+ return (void *)MORECORE_FAILURE;
mem_malloc_brk = new;