BUILD: fd: remove unused variable totlen in fd_write_frag_line()

Ilya reports in GH #1392 that clang 13 complains about totlen being
calculated and not used in fd_write_frag_line(), which is true. It's
a leftover of some older code.
This commit is contained in:
Willy Tarreau 2021-09-17 12:00:27 +02:00
parent b5d1141305
commit 87063a7da1

View File

@ -545,7 +545,6 @@ int fd_update_events(int fd, uint evts)
ssize_t fd_write_frag_line(int fd, size_t maxlen, const struct ist pfx[], size_t npfx, const struct ist msg[], size_t nmsg, int nl)
{
struct iovec iovec[32];
size_t totlen = 0;
size_t sent = 0;
int vec = 0;
int attempts = 0;
@ -572,7 +571,6 @@ ssize_t fd_write_frag_line(int fd, size_t maxlen, const struct ist pfx[], size_t
iovec[vec].iov_base = pfx->ptr;
iovec[vec].iov_len = MIN(maxlen, pfx->len);
maxlen -= iovec[vec].iov_len;
totlen += iovec[vec].iov_len;
if (iovec[vec].iov_len)
vec++;
pfx++; npfx--;