mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 00:35:10 +00:00
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…
x
Reference in New Issue
Block a user