]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: ostream-multiplex - Fix dead assignment by adding an assertion on the result.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 12 Oct 2020 21:18:09 +0000 (23:18 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 15 Oct 2020 16:12:16 +0000 (16:12 +0000)
Found by Clang scan-build.

src/lib/ostream-multiplex.c

index b248995fdbf4553dc05ee20d8005931087287377..323a0d32c9915bc22cd4480068c052435350a900 100644 (file)
@@ -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;
        }