diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-29 00:29:16 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-29 00:45:23 -0600 |
commit | 3d92a162cd6e0e9f941795dfadbd85f491a72a33 (patch) | |
tree | 2a9ae01d67f10b02293e26fb94194cd55a10fb91 /libnetio/netio_posix.c | |
parent | a5ff9ff765d3e14d01099fade6b94624bb8de22b (diff) |
libcr: Fix stack alignment
Diffstat (limited to 'libnetio/netio_posix.c')
-rw-r--r-- | libnetio/netio_posix.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libnetio/netio_posix.c b/libnetio/netio_posix.c index 2cc6be4..4522683 100644 --- a/libnetio/netio_posix.c +++ b/libnetio/netio_posix.c @@ -87,7 +87,7 @@ int netio_listen(uint16_t port) { union { struct sockaddr_in in; struct sockaddr gen; - } addr; + } addr = { 0 }; _netio_init(); @@ -101,7 +101,6 @@ int netio_listen(uint16_t port) { sock = &socket_table[handle]; /* Bind the socket. */ - memset(&addr, 0, sizeof addr); addr.in.sin_family = AF_INET; addr.in.sin_port = htons(port); sock->fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); |