diff --git a/ly-core/src/interop.zig b/ly-core/src/interop.zig index e09f932..6a9a6de 100644 --- a/ly-core/src/interop.zig +++ b/ly-core/src/interop.zig @@ -279,11 +279,11 @@ const platform_struct = PlatformStruct(); // TODO 0.16.0: Can we get away with this? pub fn isError(result: anytype) bool { - if (@TypeOf(result) == c_int) { + if (@typeInfo(@TypeOf(result)).int.signedness == .signed) { return result < 0; } - if (@TypeOf(result) == usize) { + if (@typeInfo(@TypeOf(result)).int.signedness == .unsigned) { return switch (builtin.os.tag) { .linux => std.os.linux.errno(result) != .SUCCESS, else => @compileError("interop.isError() not implemented for current target!"), diff --git a/src/auth.zig b/src/auth.zig index 964f4a1..77621da 100644 --- a/src/auth.zig +++ b/src/auth.zig @@ -471,7 +471,6 @@ fn executeX11Cmd(log_file: *LogFile, allocator: std.mem.Allocator, io: std.Io, s while (ok != 0) { xcb = interop.xcb.xcb_connect(null, null); ok = interop.xcb.xcb_connection_has_error(xcb); - // TODO 0.16.0: Does this work? std.posix.kill(pid, @enumFromInt(0)) catch |e| { if (e == error.ProcessNotFound and ok != 0) return error.XcbConnectionFailed; }; diff --git a/src/main.zig b/src/main.zig index ea93655..34a7142 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2263,7 +2263,6 @@ fn getBatteryPercentage(io: std.Io, battery_id: []const u8) !u8 { defer battery_file.close(io); var buffer: [8]u8 = undefined; - // TODO 0.16.0: Check if that works const bytes_read = try battery_file.readStreaming(io, &.{&buffer}); const capacity_str = buffer[0..bytes_read];