mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
This commit is contained in:

committed by
Wolfgang Denk

parent
a2513e27e8
commit
ae30b8c200
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user