Skip to content

Commit

Permalink
xwiimote: adjust error check
Browse files Browse the repository at this point in the history
  • Loading branch information
v1993 committed Feb 20, 2024
1 parent 327f8e2 commit e0b61c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vapi/xwiimote.vapi
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ namespace XWiimote {
[CCode (cname = "EAGAIN")]
private const int EAGAIN;

// This is pretty stupid
private int error_check(int ret) throws GLib.IOError {
if (ret >= 0) return ret;
throw new GLib.IOError.FAILED(GLib.strerror(-ret));
throw GLib.IOError.from_errno(-ret);
}
}

Expand Down

0 comments on commit e0b61c9

Please sign in to comment.