diff options
author | Omar Polo <op@omarpolo.com> | 2024-07-08 20:06:02 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-07-08 20:06:02 +0000 |
commit | 502817ef1461c78e8bbac34a4e5b33e17f1a84fd (patch) | |
tree | d336cd3b09b75a49866086b1e0b5688f265140c0 | |
parent | 3bb8dcd1a8126baf8b9c731485fb2d664df1dd15 (diff) |
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.
-rw-r--r-- | server.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -1301,7 +1301,6 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, void *cb_arg) 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; |