Skip to content

Commit

Permalink
fix: macos return errno errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mochalins committed Sep 23, 2024
1 parent ea9fd1e commit 98f8583
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend/macos.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ pub fn configure(
c.cfsetospeed(@ptrCast(&settings), @intFromEnum(config.baud_rate)),
)) {
.SUCCESS => {},
else => |err| std.posix.unexpectedErrno(err),
else => |err| return std.posix.unexpectedErrno(err),
}
switch (std.posix.errno(
c.cfsetispeed(@ptrCast(&settings), @intFromEnum(ibr)),
)) {
.SUCCESS => {},
else => |err| std.posix.unexpectedErrno(err),
else => |err| return std.posix.unexpectedErrno(err),
}
} else {
switch (std.posix.errno(
c.cfsetspeed(@ptrCast(&settings), @intFromEnum(config.baud_rate)),
)) {
.SUCCESS => {},
else => |err| std.posix.unexpectedErrno(err),
else => |err| return std.posix.unexpectedErrno(err),
}
}

Expand Down

0 comments on commit 98f8583

Please sign in to comment.