mescc: Mes C Library: Fix brk return type compare.
* lib/stdlib/malloc.c (malloc): Fix brk return type compare.
This commit is contained in:
parent
3cc45d7137
commit
9ab1e5cbef
|
@ -25,7 +25,7 @@ malloc (size_t size)
|
||||||
{
|
{
|
||||||
if (!__brk)
|
if (!__brk)
|
||||||
__brk = brk (0);
|
__brk = brk (0);
|
||||||
if (brk (__brk + size) == (void*)-1)
|
if (brk (__brk + size) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
char *p = __brk;
|
char *p = __brk;
|
||||||
__brk += size;
|
__brk += size;
|
||||||
|
|
Loading…
Reference in a new issue