check mmap return against -1
This commit is contained in:
parent
04b721d535
commit
9c502030a1
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user