From 3d92a162cd6e0e9f941795dfadbd85f491a72a33 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 29 Sep 2024 00:29:16 -0600 Subject: libcr: Fix stack alignment --- libnetio/netio_posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libnetio/netio_posix.c') 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); -- cgit v1.2.3-2-g168b