From: Stephan Bosch Date: Mon, 20 Apr 2020 22:13:16 +0000 (+0200) Subject: lib: ostream-wrapper - Fix dead assignments. X-Git-Tag: 2.3.11.2~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d398522995128a286c91e840270c6b95708d169;p=thirdparty%2Fdovecot%2Fcore.git lib: ostream-wrapper - Fix dead assignments. Found by Clang scan-build. --- diff --git a/src/lib/ostream-wrapper.c b/src/lib/ostream-wrapper.c index 55aa017b95..62416430e3 100644 --- a/src/lib/ostream-wrapper.c +++ b/src/lib/ostream-wrapper.c @@ -398,7 +398,6 @@ wrapper_ostream_writev_full(struct wrapper_ostream *wostream, /* Blocking; loop and wait until all is sent */ - i = 0; sent_total = 0; for (;;) { struct const_iovec niov; @@ -641,11 +640,10 @@ wrapper_ostream_sendv_real(struct wrapper_ostream *wostream, /* Determine total size of data to send */ size = 0; - for (i = 0, size = 0; i < iov_count; i++) + for (i = 0; i < iov_count; i++) size += iov[i].iov_len; /* Flush buffer if required */ - ret = 1; if (!wrapper_ostream_is_empty(wostream) && (!stream->corked || wrapper_ostream_is_filled(wostream)) && wrapper_ostream_send_prepare(wostream, size) &&