# std.c: Use std.c.NI as the flags type in getnameinfo · gitcafe/zig

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

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

Visibility: public

Requested revision: 2ccfb1dafd03c906c5ca22f4eaaf07feaff758e5

Requested commit: 2ccfb1dafd03c906c5ca22f4eaaf07feaff758e5

Commit: 2ccfb1dafd03c906c5ca22f4eaaf07feaff758e5

Tree: b22b220b70e7c5039eb40201f3314b7a00b0f0fe

Author: Karol Kosek

Committer: Karol Kosek

## Message

```
std.c: Use std.c.NI as the flags type in getnameinfo

std.c.NI was never used in the source, so let's finally use it and make
the function more clear!

This is a breaking change, although a minor one: If you previously passed 0 here
(meaning no flags), then now you have to pass an empty struct (.{}) instead.
Otherwise, you probably used @bitCast() shenanigans here (like
@bitCast(c.NI { .NUMERICHOST = true }) and that will still work, but you can
also get rid of the @bitCast() now!

```

## Parents

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

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