From 8289ac1be645d3aa7d5be668528b049e14b73793 Mon Sep 17 00:00:00 2001 From: Gabriel Marin Date: Wed, 25 Sep 2024 23:00:36 +0300 Subject: [PATCH] lib/cw-out: initialize 'flush_all' directly Closes #15044 --- lib/cw-out.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cw-out.c b/lib/cw-out.c index 9e56b0bd6d..4d3df0a650 100644 --- a/lib/cw-out.c +++ b/lib/cw-out.c @@ -402,9 +402,8 @@ static CURLcode cw_out_write(struct Curl_easy *data, { struct cw_out_ctx *ctx = writer->ctx; CURLcode result; - bool flush_all; + bool flush_all = !!(type & CLIENTWRITE_EOS); - flush_all = (type & CLIENTWRITE_EOS) ? TRUE : FALSE; if((type & CLIENTWRITE_BODY) || ((type & CLIENTWRITE_HEADER) && data->set.include_header)) { result = cw_out_do_write(ctx, data, CW_OUT_BODY, flush_all, buf, blen); -- 2.47.3