- } else if (ctx->msgbuf_data_len > UBUS_MSG_CHUNK_SIZE) {
- if (ctx->msgbuf_reduction_counter > 0) {
- len = -1;
- --ctx->msgbuf_reduction_counter;
- } else
- len = UBUS_MSG_CHUNK_SIZE;
- } else
+ else if (ctx->msgbuf_reduction_counter > 0 && len < UBUS_MSG_CHUNK_SIZE)
+ len = !--ctx->msgbuf_reduction_counter ? UBUS_MSG_CHUNK_SIZE : -1;
+ else