aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-07-08 20:06:02 +0000
committerOmar Polo <op@omarpolo.com>2024-07-08 20:06:02 +0000
commit502817ef1461c78e8bbac34a4e5b33e17f1a84fd (patch)
treed336cd3b09b75a49866086b1e0b5688f265140c0
parent3bb8dcd1a8126baf8b9c731485fb2d664df1dd15 (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.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/server.c b/server.c
index a8d1f06..b8e4479 100644
--- a/server.c
+++ b/server.c
@@ -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;