lib/src/docs/test: improve curl_easy_setopt() calls

Fix invokes where the argument was not the correct type.

Closes #17160
This commit is contained in:
Daniel Stenberg 2025-04-23 23:13:29 +02:00
parent 179aeeaf22
commit f9f1a15699
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
22 changed files with 39 additions and 34 deletions

View file

@ -233,7 +233,7 @@ static int my_progress_cb(void *userdata,
}
static int setup(CURL *hnd, const char *url, struct transfer *t,
int http_version, struct curl_slist *host,
long http_version, struct curl_slist *host,
CURLSH *share, int use_earlydata, int fresh_connect)
{
curl_easy_setopt(hnd, CURLOPT_SHARE, share);

View file

@ -252,7 +252,7 @@ static int my_progress_cb(void *userdata,
}
static int setup(CURL *hnd, const char *url, struct transfer *t,
int http_version, struct curl_slist *host,
long http_version, struct curl_slist *host,
CURLSH *share, int use_earlydata, int announce_length)
{
curl_easy_setopt(hnd, CURLOPT_SHARE, share);

View file

@ -138,7 +138,7 @@ static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *opaque)
static int add_transfer(CURLM *multi, CURLSH *share,
struct curl_slist *resolve,
const char *url, int http_version)
const char *url, long http_version)
{
CURL *easy;
CURLMcode mc;

View file

@ -208,7 +208,7 @@ int main(int argc, char *argv[])
struct curl_slist *resolve = NULL;
char resolve_buf[1024];
char *url, *host = NULL, *port = NULL;
int http_version = CURL_HTTP_VERSION_1_1;
long http_version = CURL_HTTP_VERSION_1_1;
int ch;
while((ch = getopt(argc, argv, "V:")) != -1) {