commit 502817ef1461c78e8bbac34a4e5b33e17f1a84fd from: Omar Polo date: Mon Jul 08 20:06:02 2024 UTC no need to clear error before calling read(2) There are only a few functions (so badly designed) that need to have errno cleared beforehand (hello, strtoll!). read(2) is not among these. commit - 3bb8dcd1a8126baf8b9c731485fb2d664df1dd15 commit + 502817ef1461c78e8bbac34a4e5b33e17f1a84fd blob - a8d1f067baf2a7644d67f1cbcbdac23ad7e6effd blob + b8e4479471bda7df22cdc7bf7fd38e1a0abde2cf --- server.c +++ server.c @@ -1301,7 +1301,6 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, voi if (!c->proxy_proto) { /* no buffer to cache into, read into libtls buffer */ - errno = 0; ssize_t ret = read(c->fd, buf, buflen); if (ret == -1 && errno == EWOULDBLOCK) ret = TLS_WANT_POLLIN;