tests: make the unit test result type CURLcode

Before this patch, the result code was a mixture of `int` and
`CURLcode`.

Also adjust casts and fix a couple of minor issues found along the way.

Cherry-picked from #13489
Closes #13600
This commit is contained in:
Viktor Szakats 2024-05-11 21:36:05 +02:00
parent dad03dc593
commit 25cbc2f79a
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
221 changed files with 619 additions and 616 deletions

View file

@ -136,7 +136,7 @@ char *hexdump(const unsigned char *buffer, size_t len)
int main(int argc, char **argv)
{
char *URL;
int result;
CURLcode result;
#ifdef O_BINARY
# ifdef __HIGHC__
@ -185,5 +185,5 @@ int main(int argc, char **argv)
/* Regular program status codes are limited to 0..127 and 126 and 127 have
* special meanings by the shell, so limit a normal return code to 125 */
return result <= 125 ? result : 125;
return (int)result <= 125 ? (int)result : 125;
}

View file

@ -131,7 +131,7 @@ test_cleanup:
/* for debugging: */
/* #define SINGLETEST 9 */
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@ -162,12 +162,12 @@ int test(char *URL)
curl_global_cleanup();
printf("%d\n", status);
return status;
return (CURLcode)status;
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -28,11 +28,11 @@
if(!(expr)) { \
fprintf(stderr, "%s:%d Assertion '%s' failed: %s\n", \
__FILE__, __LINE__, #expr, msg); \
return 1; \
return (CURLcode)1; \
} \
} while(0)
int test(char *URL)
CURLcode test(char *URL)
{
int rc;
(void)URL;
@ -58,5 +58,5 @@ int test(char *URL)
rc = curl_strnequal("ii", "II", 3);
fail_unless(rc != 0, "return code should be non-zero");
return 0;
return CURLE_OK;
}

View file

@ -29,13 +29,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
int i = TEST_ERR_FAILURE;
int res = 0;
CURLcode i = TEST_ERR_FAILURE;
CURLcode res = CURLE_OK;
CURLMsg *msg;
start_test_timing();
@ -56,10 +56,11 @@ int test(char *URL)
abort_on_test_timeout();
while(still_running) {
CURLMcode mres;
int num;
res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
if(res != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", res);
mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
if(mres != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", mres);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}

View file

@ -35,11 +35,11 @@
to allow old and slow machines to run this test too */
#define MAX_BLOCKED_TIME_MS 500
int test(char *URL)
CURLcode test(char *URL)
{
CURL *handle = NULL;
CURLM *mhandle = NULL;
int res = 0;
CURLcode res = CURLE_OK;
int still_running = 0;
start_test_timing();
@ -96,7 +96,7 @@ int test(char *URL)
fprintf(stderr, "pong = %ld\n", e);
if(e > MAX_BLOCKED_TIME_MS) {
res = 100;
res = (CURLcode) 100;
break;
}
}

View file

@ -39,13 +39,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
CURLcode test(char *URL)
{
CURL *easy = NULL;
CURL *dup;
CURLM *multi = NULL;
int still_running;
int res = 0;
CURLcode res = CURLE_OK;
char redirect[160];

View file

@ -31,9 +31,9 @@
#define NUM_HANDLES 4
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {0};
int running;
CURLM *m = NULL;

View file

@ -47,9 +47,9 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return CURL_READFUNC_ABORT;
}
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
CURL *curl = NULL;
CURLM *mcurl = NULL;
int still_running = 1;

View file

@ -27,9 +27,9 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
CURLM *m = NULL;
(void)URL;

View file

@ -32,12 +32,12 @@ size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream);
static unsigned long realHeaderSize = 0;
int test(char *URL)
CURLcode test(char *URL)
{
long headerSize;
CURLcode code;
CURL *curl = NULL;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);
@ -57,7 +57,7 @@ int test(char *URL)
if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_perform() failed, "
"with code %d (%s)\n",
__FILE__, __LINE__, (int)code, curl_easy_strerror(code));
__FILE__, __LINE__, code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
@ -66,7 +66,7 @@ int test(char *URL)
if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
"with code %d (%s)\n",
__FILE__, __LINE__, (int)code, curl_easy_strerror(code));
__FILE__, __LINE__, code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}

View file

@ -31,9 +31,9 @@
#define NUM_URLS 4
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
CURL *curl = NULL;
int i;
char target_url[256];

View file

@ -25,11 +25,11 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
long unmet;
CURL *curl = NULL;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -34,9 +34,9 @@
#define NUM_HANDLES 2
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
CURL *curl[NUM_HANDLES] = {NULL, NULL};
char *port = libtest_arg3;
char *address = libtest_arg2;

View file

@ -47,10 +47,10 @@ static int progressKiller(void *arg,
return 1;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -54,11 +54,11 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0; /* no more data left to deliver */
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode result = CURLE_OK;
int res = 0;
CURLcode res = CURLE_OK;
struct WriteThis pooh = { data, sizeof(data)-1 };
global_init(CURL_GLOBAL_ALL);
@ -82,5 +82,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)result;
return result;
}

View file

@ -49,12 +49,12 @@ static int debug_callback(CURL *curl, curl_infotype info, char *msg,
return 0;
}
static int do_one_request(CURLM *m, char *URL, char *resolve)
static CURLcode do_one_request(CURLM *m, char *URL, char *resolve)
{
CURL *curls;
struct curl_slist *resolve_list = NULL;
int still_running;
int res = 0;
CURLcode res = CURLE_OK;
CURLMsg *msg;
int msgs_left;
@ -110,10 +110,10 @@ test_cleanup:
return res;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURLM *multi = NULL;
int res = 0;
CURLcode res = CURLE_OK;
char *address = libtest_arg2;
char *port = libtest_arg3;
char *path = URL;
@ -136,8 +136,9 @@ int test(char *URL)
/* second request must succeed like the first one */
res = do_one_request(multi, target_url, dns_entry);
if(res)
if(res != CURLE_OK) {
goto test_cleanup;
}
if(i < count)
sleep(DNS_TIMEOUT + 1);
@ -148,5 +149,5 @@ test_cleanup:
curl_multi_cleanup(multi);
curl_global_cleanup();
return (int) res;
return res;
}

View file

@ -53,7 +53,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return tocopy;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -64,9 +64,9 @@ int test(char *URL)
#if (defined(_WIN32) || defined(__CYGWIN__))
printf("Windows TCP does not deliver response data but reports "
"CONNABORTED\n");
return 1; /* skip since test will fail on Windows without workaround */
return (CURLcode)1; /* skip since it fails on Windows without workaround */
#else
return 0; /* sure, run this! */
return CURLE_OK; /* sure, run this! */
#endif
}

View file

@ -37,7 +37,7 @@ static size_t writecb(char *buffer, size_t size, size_t nitems,
return 0;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -84,13 +84,13 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, writecb);
printf("res %d\n"
"status %d\n"
"redirects %d\n"
"status %ld\n"
"redirects %ld\n"
"effectiveurl %s\n"
"redirecturl %s\n",
(int)res,
(int)curlResponseCode,
(int)curlRedirectCount,
res,
curlResponseCode,
curlRedirectCount,
effectiveUrl,
redirectUrl ? redirectUrl : "blank");

View file

@ -71,7 +71,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
return 0;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res;
CURL *curl;
@ -111,5 +111,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -49,7 +49,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd,
return CURL_SOCKOPT_OK;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode code = TEST_ERR_MAJOR_BAD;
CURLcode res;
@ -97,5 +97,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)code;
return code;
}

View file

@ -55,7 +55,7 @@ static CURLcode run(CURL *hnd, long limit, long time)
return curl_easy_perform(hnd);
}
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode ret;
CURL *hnd;
@ -81,5 +81,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
curl_global_cleanup();
return (int)ret;
return ret;
}

View file

@ -46,7 +46,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -96,5 +96,5 @@ test_cleanup:
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -44,7 +44,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return strlen(data);
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -101,5 +101,5 @@ test_cleanup:
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -45,7 +45,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -98,5 +98,5 @@ test_cleanup:
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -26,7 +26,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -71,5 +71,5 @@ test_cleanup:
curl_slist_free_all(phl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -26,7 +26,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -59,5 +59,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -37,7 +37,7 @@ static curl_socket_t opensocket(void *clientp,
return CURL_SOCKET_BAD;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -66,5 +66,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -33,14 +33,14 @@
static char const testData[] = ".abc\0xyz";
static off_t const testDataSize = sizeof(testData) - 1;
int test(char *URL)
CURLcode test(char *URL)
{
CURL *easy;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
CURLMsg *msg; /* for picking up messages with the transfer status */
int msgs_left; /* how many messages are left */
int res = CURLE_OK;
CURLcode res = CURLE_OK;
start_test_timing();

View file

@ -27,7 +27,7 @@
/* Test CURLINFO_RESPONSE_CODE */
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
long httpcode;
@ -78,5 +78,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -106,7 +106,7 @@ static int perform_and_check_connections(CURL *curl, const char *description,
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed with %d\n", (int)res);
fprintf(stderr, "curl_easy_perform() failed with %d\n", res);
return TEST_ERR_MAJOR_BAD;
}
@ -127,11 +127,12 @@ static int perform_and_check_connections(CURL *curl, const char *description,
}
int test(char *URL)
CURLcode test(char *URL)
{
struct cb_data data;
CURL *curl = NULL;
int res = TEST_ERR_FAILURE;
CURLcode res = TEST_ERR_FAILURE;
int result;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
@ -157,17 +158,19 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
test_setopt(curl, CURLOPT_WRITEDATA, &data);
res = perform_and_check_connections(curl,
result = perform_and_check_connections(curl,
"First request without CURLOPT_KEEP_SENDING_ON_ERROR", 1);
if(res != TEST_ERR_SUCCESS) {
if(result != TEST_ERR_SUCCESS) {
res = (CURLcode) result;
goto test_cleanup;
}
reset_data(&data, curl);
res = perform_and_check_connections(curl,
result = perform_and_check_connections(curl,
"Second request without CURLOPT_KEEP_SENDING_ON_ERROR", 1);
if(res != TEST_ERR_SUCCESS) {
if(result != TEST_ERR_SUCCESS) {
res = (CURLcode) result;
goto test_cleanup;
}
@ -175,17 +178,19 @@ int test(char *URL)
reset_data(&data, curl);
res = perform_and_check_connections(curl,
result = perform_and_check_connections(curl,
"First request with CURLOPT_KEEP_SENDING_ON_ERROR", 1);
if(res != TEST_ERR_SUCCESS) {
if(result != TEST_ERR_SUCCESS) {
res = (CURLcode) result;
goto test_cleanup;
}
reset_data(&data, curl);
res = perform_and_check_connections(curl,
result = perform_and_check_connections(curl,
"Second request with CURLOPT_KEEP_SENDING_ON_ERROR", 0);
if(res != TEST_ERR_SUCCESS) {
if(result != TEST_ERR_SUCCESS) {
res = (CURLcode) result;
goto test_cleanup;
}
@ -197,5 +202,5 @@ test_cleanup:
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,7 +27,7 @@
/* Test CURLINFO_FILETIME */
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl, *dupe = NULL;
long filetime;
@ -127,5 +127,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_easy_cleanup(dupe);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,7 +27,7 @@
/* Test CURLINFO_PROTOCOL */
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl, *dupe = NULL;
long protocol;
@ -134,5 +134,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_easy_cleanup(dupe);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,7 +27,7 @@
/* Test CURLINFO_SCHEME */
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl, *dupe = NULL;
char *scheme;
@ -127,5 +127,5 @@ test_cleanup:
curl_easy_cleanup(curl);
curl_easy_cleanup(dupe);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
@ -87,5 +87,5 @@ test_cleanup:
curl_free(ptr);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -25,9 +25,9 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
CURLcode easyret;
CURLMcode multiret;
CURLSHcode shareret;
@ -56,5 +56,5 @@ int test(char *URL)
printf("u%d: %s\n", (int)urlret, curl_url_strerror(urlret));
}
return (int)res;
return res;
}

View file

@ -82,10 +82,10 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
return CURL_WRITEFUNC_PAUSE;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curls = NULL;
int res = 0;
CURLcode res = CURLE_OK;
struct transfer_status st;
start_test_timing();
@ -114,5 +114,5 @@ test_cleanup:
curl_easy_cleanup(curls);
curl_global_cleanup();
return (int)res; /* return the final return code */
return res; /* return the final return code */
}

View file

@ -110,10 +110,10 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
return size * nmemb;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curls = NULL;
int res = 0;
CURLcode res = CURLE_OK;
struct transfer_status st;
start_test_timing();
@ -148,5 +148,5 @@ test_cleanup:
curl_easy_cleanup(curls);
curl_global_cleanup();
return (int)res; /* return the final return code */
return res; /* return the final return code */
}

View file

@ -36,10 +36,10 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *easy = NULL;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -26,10 +26,10 @@
#endif
#include "test.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *eh = NULL;
int res = 0;
CURLcode res = CURLE_OK;
struct curl_httppost *lastptr = NULL;
struct curl_httppost *m_formpost = NULL;

View file

@ -27,10 +27,10 @@
#include <curl/multi.h>
int test(char *URL)
CURLcode test(char *URL)
{
CURLM *handle;
int res = CURLE_OK;
CURLcode res = CURLE_OK;
static const char * const bl_servers[] =
{"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
static const char * const bl_sites[] =
@ -44,5 +44,5 @@ int test(char *URL)
curl_multi_setopt(handle, CURLMOPT_PIPELINING_SITE_BL, bl_sites);
curl_multi_cleanup(handle);
curl_global_cleanup();
return 0;
return CURLE_OK;
}

View file

@ -27,7 +27,7 @@
#include <curl/multi.h>
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -49,5 +49,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -29,13 +29,13 @@
#define TEST_HANG_TIMEOUT 60 * 1000
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
int i = 0;
int res = 0;
CURLcode i = CURLE_OK;
CURLcode res = CURLE_OK;
CURLMsg *msg;
int counter = 3;
@ -59,10 +59,11 @@ int test(char *URL)
abort_on_test_timeout();
while(still_running && counter--) {
CURLMcode mres;
int num;
res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
if(res != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", res);
mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
if(mres != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", mres);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}

View file

@ -42,13 +42,13 @@ static int xferinfo(void *p,
return 1; /* fail as fast as we can */
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curls = NULL;
CURLM *multi = NULL;
int still_running;
int i = 0;
int res = 0;
CURLcode i = CURLE_OK;
CURLcode res = CURLE_OK;
curl_mimepart *field = NULL;
curl_mime *mime = NULL;
int counter = 1;
@ -81,10 +81,11 @@ int test(char *URL)
abort_on_test_timeout();
while(still_running && counter--) {
CURLMcode mres;
int num;
res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
if(res != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", res);
mres = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
if(mres != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", mres);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}

View file

@ -43,7 +43,7 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
}
/* test function */
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURLSH *share = NULL;
@ -91,5 +91,5 @@ test_cleanup:
curl_share_cleanup(share);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -53,9 +53,9 @@ static int progressCallback(void *arg,
return 1;
}
int test(char *URL)
CURLcode test(char *URL)
{
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -44,11 +44,11 @@ static size_t header(void *ptr, size_t size, size_t nmemb, void *stream)
return nmemb * size;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode code;
CURL *curl = NULL;
int res = 0;
CURLcode res = CURLE_OK;
struct headerinfo info = {0};
global_init(CURL_GLOBAL_ALL);
@ -64,7 +64,7 @@ int test(char *URL)
if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_perform() failed, "
"with code %d (%s)\n",
__FILE__, __LINE__, (int)code, curl_easy_strerror(code));
__FILE__, __LINE__, code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}

View file

@ -27,13 +27,13 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLM *curlm = NULL;
CURL *curl1 = NULL;
CURL *curl2 = NULL;
int running_handles = 0;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl = NULL;
@ -58,7 +58,7 @@ int test(char *URL)
curl_easy_cleanup(curl);
curl_global_cleanup();
return 0;
return CURLE_OK;
test_cleanup:

View file

@ -28,7 +28,7 @@
#include "memdebug.h"
#define EXCESSIVE 10*1000*1000
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl = NULL;
@ -37,7 +37,7 @@ int test(char *URL)
(void)URL;
if(!longurl)
return 1;
return (CURLcode)1;
memset(longurl, 'a', EXCESSIVE);
longurl[EXCESSIVE-1] = 0;
@ -47,11 +47,11 @@ int test(char *URL)
res = curl_easy_setopt(curl, CURLOPT_URL, longurl);
printf("CURLOPT_URL %d bytes URL == %d\n",
EXCESSIVE, (int)res);
EXCESSIVE, res);
res = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, longurl);
printf("CURLOPT_POSTFIELDS %d bytes data == %d\n",
EXCESSIVE, (int)res);
EXCESSIVE, res);
u = curl_url();
if(u) {

View file

@ -1847,43 +1847,43 @@ err:
return 1;
}
int test(char *URL)
CURLcode test(char *URL)
{
(void)URL; /* not used */
if(urldup())
return 11;
return (CURLcode)11;
if(setget_parts())
return 10;
return (CURLcode)10;
if(get_url())
return 3;
return (CURLcode)3;
if(huge())
return 9;
return (CURLcode)9;
if(get_nothing())
return 7;
return (CURLcode)7;
if(scopeid())
return 6;
return (CURLcode)6;
if(append())
return 5;
return (CURLcode)5;
if(set_url())
return 1;
return (CURLcode)1;
if(set_parts())
return 2;
return (CURLcode)2;
if(get_parts())
return 4;
return (CURLcode)4;
if(clear_url())
return 8;
return (CURLcode)8;
printf("success\n");
return 0;
return CURLE_OK;
}

View file

@ -30,12 +30,12 @@
#define TEST_HANG_TIMEOUT 60 * 1000
#define WAKEUP_NUM 10
int test(char *URL)
CURLcode test(char *URL)
{
CURLM *multi = NULL;
int numfds;
int i;
int res = 0;
CURLcode res = CURLE_OK;
struct timeval time_before_wait, time_after_wait;
(void)URL;

View file

@ -38,7 +38,7 @@
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static CURL *pending_handles[CONN_NUM];
static int pending_num = 0;
static int test_failure = 0;
static CURLcode test_failure = CURLE_OK;
static CURLM *multi = NULL;
static const char *url;
@ -46,7 +46,7 @@ static const char *url;
static void *run_thread(void *ptr)
{
CURL *easy = NULL;
int res = 0;
CURLcode res = CURLE_OK;
int i;
(void)ptr;
@ -89,12 +89,13 @@ test_cleanup:
return NULL;
}
int test(char *URL)
CURLcode test(char *URL)
{
int still_running;
int num;
int i;
int res = 0;
int result;
CURLcode res = CURLE_OK;
CURL *started_handles[CONN_NUM];
int started_num = 0;
int finished_num = 0;
@ -110,12 +111,12 @@ int test(char *URL)
url = URL;
res = pthread_create(&tid, NULL, run_thread, NULL);
if(!res)
result = pthread_create(&tid, NULL, run_thread, NULL);
if(!result)
tid_valid = true;
else {
fprintf(stderr, "%s:%d Couldn't create thread, errno %d\n",
__FILE__, __LINE__, res);
__FILE__, __LINE__, result);
goto test_cleanup;
}
@ -201,7 +202,7 @@ test_cleanup:
}
#else /* without pthread, this test doesn't work */
int test(char *URL)
CURLcode test(char *URL)
{
(void)URL;
return 0;

View file

@ -27,7 +27,7 @@
#include <curl/multi.h>
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_OK;
@ -55,5 +55,5 @@ test_cleanup:
curl_url_cleanup(u);
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -26,7 +26,7 @@
#include "testtrace.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode ret;
CURL *hnd;
@ -48,5 +48,5 @@ int test(char *URL)
hnd = NULL;
curl_global_cleanup();
return (int)ret;
return ret;
}

View file

@ -26,7 +26,7 @@
#include "testtrace.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
@ -47,5 +47,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(hnd);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -73,7 +73,7 @@ static int trailers_callback(struct curl_slist **list, void *userdata)
}
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -116,5 +116,5 @@ test_cleanup:
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -41,7 +41,7 @@
#include <sys/stat.h>
int test(char *URL)
CURLcode test(char *URL)
{
int stillRunning;
CURLM *multiHandle = NULL;
@ -103,8 +103,7 @@ int test(char *URL)
start_test_timing();
mres = curl_multi_remove_handle(multiHandle, curl);
if(mres) {
fprintf(stderr, "curl_multi_remove_handle() failed, "
"with code %d\n", (int)res);
fprintf(stderr, "curl_multi_remove_handle() failed, with code %d\n", mres);
res = TEST_ERR_MULTI;
goto test_cleanup;
}
@ -120,5 +119,5 @@ test_cleanup:
curl_multi_cleanup(multiHandle);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -28,12 +28,12 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
struct curl_slist *header = NULL;
long unmet;
CURL *curl = NULL;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -28,12 +28,12 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
struct curl_slist *header = NULL;
curl_off_t retry;
CURL *curl = NULL;
int res = 0;
CURLcode res = CURLE_OK;
global_init(CURL_GLOBAL_ALL);

View file

@ -33,10 +33,10 @@ struct pair {
CURLcode *exp;
};
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
int res = 0;
CURLcode res = CURLE_OK;
CURLcode result = CURLE_OK;
curl_version_info_data *curlinfo;
const char *const *proto;
@ -77,7 +77,7 @@ int test(char *URL)
curlinfo = curl_version_info(CURLVERSION_NOW);
if(!curlinfo) {
fputs("curl_version_info failed\n", stderr);
res = (int) TEST_ERR_FAILURE;
res = TEST_ERR_FAILURE;
goto test_cleanup;
}
@ -85,7 +85,7 @@ int test(char *URL)
for(proto = curlinfo->protocols; *proto; proto++) {
if((size_t) n >= sizeof(protolist)) {
puts("protolist buffer too small\n");
res = (int) TEST_ERR_FAILURE;
res = TEST_ERR_FAILURE;
goto test_cleanup;
}
n += msnprintf(protolist + n, sizeof(protolist) - n, ",%s", *proto);
@ -99,17 +99,15 @@ int test(char *URL)
for(i = 0; prots[i].in; i++) {
result = curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, prots[i].in);
if(result != *prots[i].exp) {
printf("unexpectedly '%s' returned %u\n",
prots[i].in, result);
printf("unexpectedly '%s' returned %d\n", prots[i].in, result);
break;
}
}
printf("Tested %u strings\n", i);
res = (int)result;
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)result;
return result;
}

View file

@ -54,7 +54,7 @@ static int trailers_callback(struct curl_slist **list, void *userdata)
static const char *post_data = "xxx=yyy&aaa=bbbbb";
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
@ -103,5 +103,5 @@ test_cleanup:
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -47,7 +47,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
}
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
@ -86,5 +86,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
curl_mime_free(mime1);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd = NULL;
@ -45,11 +45,11 @@ int test(char *URL)
curl_easy_cleanup(hnd);
curl_easy_cleanup(second);
curl_global_cleanup();
return 0;
return CURLE_OK;
test_cleanup:
curl_easy_cleanup(hnd);
curl_easy_cleanup(second);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -53,7 +53,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return 0;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -91,5 +91,5 @@ test_cleanup:
curl_slist_free_all(chunk);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -28,7 +28,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *ch = NULL;
@ -53,5 +53,5 @@ test_cleanup:
curl_easy_cleanup(ch);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -28,7 +28,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLSH *sh = NULL;
CURL *ch = NULL;
@ -40,7 +40,7 @@ int test(char *URL)
cm = curl_multi_init();
if(!cm) {
curl_global_cleanup();
return 1;
return (CURLcode)1;
}
sh = curl_share_init();
if(!sh)
@ -96,5 +96,5 @@ cleanup:
curl_multi_cleanup(cm);
curl_global_cleanup();
return 0;
return CURLE_OK;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
char *url_after = NULL;
@ -49,7 +49,7 @@ int test(char *URL)
if(res != CURLE_COULDNT_CONNECT && res != CURLE_OPERATION_TIMEDOUT) {
fprintf(stderr, "failure expected, "
"curl_easy_perform returned %d: <%s>, <%s>\n",
(int) res, curl_easy_strerror(res), error_buffer);
res, curl_easy_strerror(res), error_buffer);
if(res == CURLE_OK)
res = TEST_ERR_MAJOR_BAD; /* force an error return */
goto test_cleanup;
@ -68,8 +68,8 @@ int test(char *URL)
res = curl_easy_perform(curl);
if(res)
fprintf(stderr, "success expected, "
"curl_easy_perform returned %ld: <%s>, <%s>\n",
(long) res, curl_easy_strerror(res), error_buffer);
"curl_easy_perform returned %d: <%s>, <%s>\n",
res, curl_easy_strerror(res), error_buffer);
/* print url */
curl_url_get(curlu, CURLUPART_URL, &url_after, 0);
@ -81,5 +81,5 @@ test_cleanup:
curl_url_cleanup(curlu);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
char *url_after;
CURL *curl;
@ -52,5 +52,5 @@ int test(char *URL)
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@ -60,5 +60,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
return (int)ret;
return ret;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@ -45,5 +45,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
return (int)ret;
return ret;
}

View file

@ -33,7 +33,7 @@
static char buffer[MAX_INPUT_LENGTH + 2];
int test(char *URL)
CURLcode test(char *URL)
{
const struct curl_easyoption *o;
CURL *easy;
@ -44,7 +44,7 @@ int test(char *URL)
easy = curl_easy_init();
if(!easy) {
curl_global_cleanup();
return 1;
return (CURLcode)1;
}
/* make it a null-terminated C string with just As */
@ -86,7 +86,7 @@ int test(char *URL)
default:
/* all other return codes are unexpected */
fprintf(stderr, "curl_easy_setopt(%s...) returned %d\n",
o->name, (int)result);
o->name, result);
error++;
break;
}
@ -94,5 +94,5 @@ int test(char *URL)
}
curl_easy_cleanup(easy);
curl_global_cleanup();
return error;
return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
}

View file

@ -30,7 +30,7 @@
#define print_err(name, exp) \
fprintf(stderr, "Type mismatch for CURLOPT_%s (expected %s)\n", name, exp);
int test(char *URL)
CURLcode test(char *URL)
{
/* Only test if GCC typechecking is available */
int error = 0;
@ -80,5 +80,5 @@ int test(char *URL)
}
#endif
(void)URL;
return error;
return error == 0 ? CURLE_OK : TEST_ERR_FAILURE;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode ret = CURLE_OK;
CURL *hnd;
@ -46,5 +46,5 @@ int test(char *URL)
curl_easy_cleanup(hnd);
}
curl_global_cleanup();
return (int)ret;
return ret;
}

View file

@ -96,7 +96,7 @@ static CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *e,
* Read/write HSTS cache entries via callback.
*/
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *hnd;
@ -114,7 +114,7 @@ int test(char *URL)
res = curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
hnd = NULL;
printf("First request returned %d\n", (int)res);
printf("First request returned %d\n", res);
res = CURLE_OK;
easy_init(hnd);
@ -127,10 +127,10 @@ int test(char *URL)
res = curl_easy_perform(hnd);
curl_easy_cleanup(hnd);
hnd = NULL;
printf("Second request returned %d\n", (int)res);
printf("Second request returned %d\n", res);
test_cleanup:
curl_easy_cleanup(hnd);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -26,7 +26,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -52,5 +52,5 @@ int test(char *URL)
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -27,10 +27,9 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
const struct curl_easyoption *o;
int error = 0;
(void)URL;
curl_global_init(CURL_GLOBAL_ALL);
@ -53,5 +52,5 @@ int test(char *URL)
}
}
curl_global_cleanup();
return error;
return CURLE_OK;
}

View file

@ -27,7 +27,7 @@
#include "warnless.h"
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLcode res = CURLE_OK;
CURL *curl;
@ -52,5 +52,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -26,7 +26,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -26,7 +26,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -26,7 +26,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURLM *multi;
CURL *easy;

View file

@ -83,7 +83,7 @@ static size_t write_cb(char *data, size_t n, size_t l, void *userp)
(void)userp;
return n*l;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *easy = NULL;
CURLcode res = CURLE_OK;
@ -116,5 +116,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(easy);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -49,7 +49,7 @@ static size_t write_cb(char *data, size_t n, size_t l, void *userp)
(void)userp;
return n*l;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *easy;
CURLcode res = CURLE_OK;
@ -70,12 +70,12 @@ int test(char *URL)
}
res = curl_easy_perform(easy);
if(res) {
printf("badness: %d\n", (int)res);
printf("badness: %d\n", res);
}
showem(easy, CURLH_CONNECT|CURLH_HEADER|CURLH_TRAILER|CURLH_1XX);
test_cleanup:
curl_easy_cleanup(easy);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -33,7 +33,7 @@ static size_t writecb(char *data, size_t n, size_t l, void *userp)
(void)userp;
return n*l;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -88,5 +88,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -41,7 +41,7 @@ static size_t put_callback(char *ptr, size_t size, size_t nmemb, void *stream)
return tocopy;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
@ -74,5 +74,5 @@ int test(char *URL)
test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
return (int)res;
return res;
}

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -68,7 +68,7 @@ static int sockopt_cb(void *clientp,
}
/* Expected args: URL IP PORT */
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl = NULL;
CURLcode res = TEST_ERR_MAJOR_BAD;
@ -78,7 +78,7 @@ int test(char *URL)
unsigned short port;
if(!strcmp("check", URL))
return 0; /* no output makes it not skipped */
return CURLE_OK; /* no output makes it not skipped */
port = (unsigned short)atoi(libtest_arg3);
@ -140,10 +140,10 @@ test_cleanup:
return res;
}
#else
int test(char *URL)
CURLcode test(char *URL)
{
(void)URL;
printf("lacks inet_pton\n");
return 0;
return CURLE_OK;
}
#endif

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -35,7 +35,7 @@ static size_t read_callback(char *buffer, size_t size, size_t nitems,
return 0;
}
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
curl_mime *mime = NULL;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

View file

@ -25,7 +25,7 @@
#include "memdebug.h"
int test(char *URL)
CURLcode test(char *URL)
{
CURL *curl;
CURLcode res = TEST_ERR_MAJOR_BAD;

Some files were not shown because too many files have changed in this diff Show more