diff --git a/io/iob_send.c b/io/iob_send.c index 4c7e5fd..ce3e79c 100644 --- a/io/iob_send.c +++ b/io/iob_send.c @@ -276,10 +276,8 @@ eagain: sent=sendmsg(s,&msg,MSG_MORE|ZEROCOPY); if (sent > 0) totalsent += sent; if (sent == l) continue; // we sent as much as we wanted, go for next batch - if (sent >= 0) { // we wrote something but not the whole batch - sent = totalsent; + if (sent >= 0) // we wrote something but not the whole batch break; - } // we got an error, maybe EAGAIN if (errno==EAGAIN) { if (totalsent == 0) { diff --git a/socket/socket_accept4_flags.c b/socket/socket_accept4_flags.c index c4b417d..7933e83 100644 --- a/socket/socket_accept4_flags.c +++ b/socket/socket_accept4_flags.c @@ -24,7 +24,7 @@ #include "haveaccept4.h" int socket_accept4_flags(int s, char ip[4], uint16 *port, int flags) { - struct sockaddr_in si; + struct sockaddr_in si = {0}; socklen_t len = sizeof si; int fd; diff --git a/socket/socket_accept6_flags.c b/socket/socket_accept6_flags.c index ec87bfa..09840e3 100644 --- a/socket/socket_accept6_flags.c +++ b/socket/socket_accept6_flags.c @@ -34,9 +34,9 @@ int socket_accept6_flags(int s, char ip[16], uint16* port, uint32* scope_id, int flags) { #ifdef LIBC_HAS_IP6 - struct sockaddr_in6 sa; + struct sockaddr_in6 sa = { 0 }; #else - struct sockaddr_in sa; + struct sockaddr_in sa = { 0 }; #endif socklen_t dummy = sizeof sa; int fd;