# zig libc: modify errno helper to eliminate \`@intCast\` · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a2ea36a51767659edf7feeee87eb237263e0dc4a)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a2ea36a51767659edf7feeee87eb237263e0dc4a

Requested commit: a2ea36a51767659edf7feeee87eb237263e0dc4a

Commit: a2ea36a51767659edf7feeee87eb237263e0dc4a

Tree: e39546b1e6be149d7dbfe9a73ff57599a657ece3

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
zig libc: modify errno helper to eliminate `@intCast`

The vast majority of libc functions return `c_int` for the return value,
when setting errno. This utility function is for those cases.

Other cases can hand-roll the logic, or additional helpers can be added.

```

## Parents

- [9d63dfaa81716a87b9c8c6dc5bdf1d07a8278b55](https://git.cafe/gitcafe/zig/commit/9d63dfaa81716a87b9c8c6dc5bdf1d07a8278b55?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a2ea36a51767659edf7feeee87eb237263e0dc4a?format=markdown)
