Commit 9b456f39 authored by Niels Möller's avatar Niels Möller
Browse files

* src/io.c (io_listen_local): Use plain offsetof.

(io_connect_local): Likewise.

Rev: src/io.c:1.138
parent b6a543ac
......@@ -1569,7 +1569,7 @@ io_listen_local(struct io_backend *b,
* In particular, it should not be an absolute filename. */
assert(!memchr(info->name->data, '/', info->name->length));
local_length = OFFSETOF(struct sockaddr_un, sun_path) + info->name->length;
local_length = offsetof(struct sockaddr_un, sun_path) + info->name->length;
local = alloca(local_length);
local->sun_family = AF_UNIX;
......@@ -1633,7 +1633,7 @@ io_connect_local(struct io_backend *b,
* In particular, it should not be an absolute filename. */
assert(!memchr(info->name->data, '/', info->name->length));
addr_length = OFFSETOF(struct sockaddr_un, sun_path) + info->name->length;
addr_length = offsetof(struct sockaddr_un, sun_path) + info->name->length;
addr = alloca(addr_length);
addr->sun_family = AF_UNIX;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment