From 9ab1e5cbefbd96bb0ab762b32a8c65e61362baac Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 24 Feb 2019 09:11:55 +0100 Subject: [PATCH] mescc: Mes C Library: Fix brk return type compare. * lib/stdlib/malloc.c (malloc): Fix brk return type compare. --- lib/stdlib/malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stdlib/malloc.c b/lib/stdlib/malloc.c index d9892308..940f95b5 100644 --- a/lib/stdlib/malloc.c +++ b/lib/stdlib/malloc.c @@ -25,7 +25,7 @@ malloc (size_t size) { if (!__brk) __brk = brk (0); - if (brk (__brk + size) == (void*)-1) + if (brk (__brk + size) == -1) return 0; char *p = __brk; __brk += size;