silence clang static analyzer

master
leitner 2 years ago
parent 4422ec3770
commit 444c36f3e8

@ -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) {

@ -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;

@ -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;

Loading…
Cancel
Save