lib/cw-out: initialize 'flush_all' directly

Closes #15044
This commit is contained in:
Gabriel Marin 2024-09-25 23:00:36 +03:00 committed by Daniel Stenberg
parent 21fb30b5d1
commit 8289ac1be6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

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