summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/malloc-simple/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index f278a9583..ed1c381a5 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -74,7 +74,7 @@ void *malloc(size_t len)
#endif
);
- if (result == (void *) -1)
+ if (result == MAP_FAILED)
return 0;
return result;