]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: fix var types in is_alive() implementations
authorStefan Eissing <stefan@eissing.org>
Thu, 10 Jul 2025 07:36:19 +0000 (09:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 10 Jul 2025 08:47:04 +0000 (10:47 +0200)
Closes #17881

lib/cf-h2-proxy.c
lib/http2.c

index c55467c70589e15bcd8383059d2c1b9b23fccefa..b1ad5bc23532c5760f2b73715d3731263b176d58 100644 (file)
@@ -1501,15 +1501,16 @@ static bool cf_h2_proxy_is_alive(struct Curl_cfilter *cf,
                                  bool *input_pending)
 {
   struct cf_h2_proxy_ctx *ctx = cf->ctx;
-  CURLcode result;
+  bool alive;
   struct cf_call_data save;
 
+  *input_pending = FALSE;
   CF_DATA_SAVE(save, cf, data);
-  result = (ctx && ctx->h2 && proxy_h2_connisalive(cf, data, input_pending));
+  alive = (ctx && ctx->h2 && proxy_h2_connisalive(cf, data, input_pending));
   CURL_TRC_CF(data, cf, "[0] conn alive -> %d, input_pending=%d",
-              result, *input_pending);
+              alive, *input_pending);
   CF_DATA_RESTORE(cf, save);
-  return result;
+  return alive;
 }
 
 static CURLcode cf_h2_proxy_query(struct Curl_cfilter *cf,
index 99f40db208d87aad7212e57b5104fecde3308464..1f65cbdd0207ebf8689b9801bb41f99f019bb18c 100644 (file)
@@ -2713,15 +2713,16 @@ static bool cf_h2_is_alive(struct Curl_cfilter *cf,
                            bool *input_pending)
 {
   struct cf_h2_ctx *ctx = cf->ctx;
-  CURLcode result;
+  bool alive;
   struct cf_call_data save;
 
+  *input_pending = FALSE;
   CF_DATA_SAVE(save, cf, data);
-  result = (ctx && ctx->h2 && http2_connisalive(cf, data, input_pending));
+  alive = (ctx && ctx->h2 && http2_connisalive(cf, data, input_pending));
   CURL_TRC_CF(data, cf, "conn alive -> %d, input_pending=%d",
-              result, *input_pending);
+              alive, *input_pending);
   CF_DATA_RESTORE(cf, save);
-  return result;
+  return alive;
 }
 
 static CURLcode cf_h2_keep_alive(struct Curl_cfilter *cf,