mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
std.os.linux.bpf: fix incorrect usage of unexpectedErrno
This commit is contained in:
parent
59d6b7bbb9
commit
3d8aa97165
@ -1513,7 +1513,7 @@ pub fn map_create(map_type: MapType, key_size: u32, value_size: u32, max_entries
|
||||
EINVAL => error.MapTypeOrAttrInvalid,
|
||||
ENOMEM => error.SystemResources,
|
||||
EPERM => error.AccessDenied,
|
||||
else => unexpectedErrno(rc),
|
||||
else => |err| unexpectedErrno(err),
|
||||
};
|
||||
}
|
||||
|
||||
@ -1539,7 +1539,7 @@ pub fn map_lookup_elem(fd: fd_t, key: []const u8, value: []u8) !void {
|
||||
EINVAL => return error.FieldInAttrNeedsZeroing,
|
||||
ENOENT => return error.NotFound,
|
||||
EPERM => return error.AccessDenied,
|
||||
else => return unexpectedErrno(rc),
|
||||
else => |err| return unexpectedErrno(err),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user