# std.os.linux.accept/accept4: allow null for addr and len · gitcafe/zig

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

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

Visibility: public

Requested revision: 23c28c72b7a5d9a3df3fc96ac9ab419fafeae819

Requested commit: 23c28c72b7a5d9a3df3fc96ac9ab419fafeae819

Commit: 23c28c72b7a5d9a3df3fc96ac9ab419fafeae819

Tree: 7c17435691a5d3755057715603c7ae424ad6bba4

Author: johnLate

Committer: LemonBoy

## Message

```
std.os.linux.accept/accept4: allow null for addr and len

std.os.accept already wants to allow null, which matches `man 3p accept`:

>  address     Either a null pointer, or a pointer to a sockaddr structure
>              where the address of the connecting  socket  shall  be  re‐
>              turned.
>
>  address_len Either  a  null pointer, if address is a null pointer, or a
>              pointer to a socklen_t object which on input specifies  the
>              length  of  the  supplied sockaddr structure, and on output
>              specifies the length of the stored address.

Fixes ziglang#6832.

```

## Parents

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

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