summaryrefslogtreecommitdiff
path: root/libnetio/netio_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetio/netio_posix.c')
-rw-r--r--libnetio/netio_posix.c3
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);