From 8b3690c688d6c992358c82b8e77dae3c3a6dde01 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Sun, 16 Feb 2025 13:39:24 +0100 Subject: [PATCH 1/2] lib: strparse.h include where missing Closes #16348 --- lib/vquic/vquic.c | 1 + lib/vssh/libssh.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c index 5937e7d4aca5..5355183bdad8 100644 --- a/lib/vquic/vquic.c +++ b/lib/vquic/vquic.c @@ -44,6 +44,7 @@ #include "vquic.h" #include "vquic_int.h" #include "strerror.h" +#include "strparse.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index b5ab7b97d333..e7ec426456ac 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -66,6 +66,7 @@ #include "parsedate.h" /* for the week day and month names */ #include "sockaddr.h" /* required for Curl_sockaddr_storage */ #include "strtoofft.h" +#include "strparse.h" #include "multiif.h" #include "select.h" #include "warnless.h" From 1ee06e873cf555ee802a4d3c5356f8eccccdaf10 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 6 Feb 2025 22:05:10 +0100 Subject: [PATCH 2/2] asyn-thread: remove 'status' from struct Curl_async While it gets stored, nothing needs nor uses it. Closes #16347 --- lib/asyn-ares.c | 1 - lib/asyn-thread.c | 1 - lib/hostasyn.c | 2 -- lib/urldata.h | 1 - 4 files changed, 5 deletions(-) diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 6caba3ceba8d..50f3bc741883 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -782,7 +782,6 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data, data->state.async.hostname = res->hostname; data->state.async.port = port; data->state.async.done = FALSE; /* not done */ - data->state.async.status = 0; /* clear */ data->state.async.dns = NULL; /* clear */ /* initial status - failed */ diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index f5a533b34b26..12a2e5e7db6b 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -437,7 +437,6 @@ static bool init_resolve_thread(struct Curl_easy *data, async->port = port; async->done = FALSE; - async->status = 0; async->dns = NULL; td->thread_hnd = curl_thread_t_null; td->start = Curl_now(); diff --git a/lib/hostasyn.c b/lib/hostasyn.c index 4d6a8e85967f..effdf8e9e250 100644 --- a/lib/hostasyn.c +++ b/lib/hostasyn.c @@ -70,8 +70,6 @@ CURLcode Curl_addrinfo_callback(struct Curl_easy *data, struct Curl_dns_entry *dns = NULL; CURLcode result = CURLE_OK; - data->state.async.status = status; - if(CURL_ASYNC_SUCCESS == status) { if(ai) { if(data->share) diff --git a/lib/urldata.h b/lib/urldata.h index 58b9d7983ae8..6744129fa66b 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -574,7 +574,6 @@ struct Curl_async { void *resolver; /* resolver state, if it is used in the URL state - ares_channel e.g. */ int port; - int status; /* if done is TRUE, this is the status from the callback */ BIT(done); /* set TRUE when the lookup is complete */ };