]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-test: ostream-final-trickle - Fix bug occurring when writing single byte.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 26 Jan 2023 00:59:39 +0000 (01:59 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 30 Jan 2023 19:48:46 +0000 (19:48 +0000)
src/lib-test/ostream-final-trickle.c

index fc8a00f9870e608458132e4d47d3bb4b367ae96d..34257f28d7f680780f913f103cfe3ce6dcbc0344 100644 (file)
@@ -89,6 +89,7 @@ o_stream_final_trickle_sendv(struct ostream_private *stream,
        if (last_iov->iov_len == 0)
                iov_count--;
 
+       ret = 0;
        if (iov_count > 0) {
                size_t full_size = 0;
                for (unsigned int i = 0; i < iov_count; i++)