| ... | @@ -608,10 +608,10 @@ pub const CompletionQueue = struct { | ... | @@ -608,10 +608,10 @@ pub const CompletionQueue = struct { |
| 608 | }; | 608 | }; |
| 609 | | 609 | |
| 610 | inline fn check_errno(res: usize) !void { | 610 | inline fn check_errno(res: usize) !void { |
| 611 | const errno = linux.getErrno(res); | 611 | switch (linux.getErrno(res)) { |
| 612 | if (errno != 0) { | 612 | 0 => return, |
| 613 | if (errno == linux.ENOSYS) return error.UnsupportedKernel; | 613 | linux.ENOSYS => return error.UnsupportedKernel, |
| 614 | return os.unexpectedErrno(errno); | 614 | else => |errno| return os.unexpectedErrno(errno) |
| 615 | } | 615 | } |
| 616 | } | 616 | } |
| 617 | | 617 | |