From: Stephan Bosch Date: Mon, 12 Oct 2020 21:18:09 +0000 (+0200) Subject: lib: ostream-multiplex - Fix dead assignment by adding an assertion on the result. X-Git-Tag: 2.3.13~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2e5d7fdfb23ec9b444c0dfca55e5f998a7657d3;p=thirdparty%2Fdovecot%2Fcore.git lib: ostream-multiplex - Fix dead assignment by adding an assertion on the result. Found by Clang scan-build. --- diff --git a/src/lib/ostream-multiplex.c b/src/lib/ostream-multiplex.c index b248995fdb..323a0d32c9 100644 --- a/src/lib/ostream-multiplex.c +++ b/src/lib/ostream-multiplex.c @@ -107,6 +107,7 @@ o_stream_multiplex_sendv(struct multiplex_ostream *mstream) propagate_error(mstream, mstream->parent->stream_errno); break; } + i_assert((size_t)ret == 1 + 4 + amt); buffer_delete(channel->buf, 0, amt); channel->last_sent_counter = ++mstream->send_counter; }