]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: Reformat ostream-dot.c
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 27 Jan 2026 02:51:49 +0000 (03:51 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 6 Feb 2026 13:08:57 +0000 (13:08 +0000)
src/lib-mail/ostream-dot.c

index f8e03e5473084929bc71a9b857ea7f349a4896c1..85db303627c7ed8353f4cf680e17219eecb83579 100644 (file)
@@ -89,7 +89,8 @@ o_stream_dot_sendv(struct ostream_private *stream,
 
        i_assert(dstream->state != STREAM_STATE_DONE);
 
-       if ((ret=o_stream_flush(stream->parent)) <= 0) {
+       ret = o_stream_flush(stream->parent);
+       if (ret <= 0) {
                /* error / we still couldn't flush existing data to
                   parent stream. */
                if (ret < 0)
@@ -110,7 +111,7 @@ o_stream_dot_sendv(struct ostream_private *stream,
 
                p = data;
                pend = CONST_PTR_OFFSET(data, size);
-               for (; p < pend && (size_t)(p-data)+2 < max_bytes; p++) {
+               for (; p < pend && ((size_t)(p - data) + 2) < max_bytes; p++) {
                        char add = 0;
 
                        switch (dstream->state) {
@@ -193,8 +194,8 @@ o_stream_dot_sendv(struct ostream_private *stream,
 
                if (max_bytes == 0)
                        break;
-               chunk = ((size_t)(p-data) >= max_bytes ?
-                               max_bytes : (size_t)(p - data));
+               chunk = ((size_t)(p - data) >= max_bytes ?
+                        max_bytes : (size_t)(p - data));
                if (chunk > 0) {
                        iovn.iov_base = data;
                        iovn.iov_len = chunk;
@@ -209,7 +210,7 @@ o_stream_dot_sendv(struct ostream_private *stream,
        iov_new = array_get(&iov_arr, &count);
        if (count == 0) {
                ret = 0;
-       } else if ((ret=o_stream_sendv(stream->parent, iov_new, count)) <= 0) {
+       } else if ((ret = o_stream_sendv(stream->parent, iov_new, count)) <= 0) {
                i_assert(ret < 0);
                o_stream_copy_error_from_parent(stream);
                return -1;