Commit 9c502030a1

MovingtoMars <liam@bumblebee.net.nz>
2016-01-28 01:45:35
check mmap return against -1
1 parent 04b721d
Changed files (1)
std/mem.zig
@@ -12,6 +12,7 @@ pub fn malloc(bytes: isize) -> ?&u8 {
 
     const failed: bool = switch (-result) {
         0          => true,
+        -1         => true,
         EINVAL     => true,
         EACCES     => true,
         EAGAIN     => true,