]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib/cw-out: initialize 'flush_all' directly
authorGabriel Marin <marin.gabriel@protonmail.com>
Wed, 25 Sep 2024 20:00:36 +0000 (23:00 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 26 Sep 2024 14:55:01 +0000 (16:55 +0200)
Closes #15044

lib/cw-out.c

index 9e56b0bd6d88dcb1116e637ab9c370578acd4f83..4d3df0a650a0b7106cd84feb714cfa9a2bdedda7 100644 (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);