From: karl.beldan@gmail.com Date: Tue, 6 Apr 2010 20:18:08 +0000 (+0200) Subject: malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ae30b8c200dc071d719ad649d0bf5635d61754f3;p=u-boot.git malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure Signed-off-by: Karl Beldan --- 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;