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)
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) {
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;
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;