mescc: Mes C Library: Fix brk return type compare.

* lib/stdlib/malloc.c (malloc): Fix brk return type compare.
This commit is contained in:
Jan Nieuwenhuizen 2019-02-24 09:11:55 +01:00
parent 3cc45d7137
commit 9ab1e5cbef
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -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;