mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
tests: constify command-line arguments
For libtests, tunits, units. Also: - lib3033: tidy up headers. - lib/netrc: constify an arg in `Curl_parsenetrc()`. Closes #18076
This commit is contained in:
parent
3407bee8c8
commit
cd586149d5
@ -390,7 +390,7 @@ const char *Curl_netrc_strerror(NETRCcode ret)
|
||||
*/
|
||||
NETRCcode Curl_parsenetrc(struct store_netrc *store, const char *host,
|
||||
char **loginp, char **passwordp,
|
||||
char *netrcfile)
|
||||
const char *netrcfile)
|
||||
{
|
||||
NETRCcode retcode = NETRC_OK;
|
||||
char *filealloc = NULL;
|
||||
|
||||
@ -48,7 +48,8 @@ void Curl_netrc_init(struct store_netrc *s);
|
||||
void Curl_netrc_cleanup(struct store_netrc *s);
|
||||
|
||||
NETRCcode Curl_parsenetrc(struct store_netrc *s, const char *host,
|
||||
char **loginp, char **passwordp, char *filename);
|
||||
char **loginp, char **passwordp,
|
||||
const char *filename);
|
||||
/* Assume: (*passwordp)[0]=0, host[0] != 0.
|
||||
* If (*loginp)[0] = 0, search for login and password within a machine
|
||||
* section in the netrc.
|
||||
|
||||
@ -50,11 +50,11 @@ int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc,
|
||||
return select(nfds, rd, wr, exc, tv);
|
||||
}
|
||||
|
||||
char *libtest_arg2 = NULL;
|
||||
char *libtest_arg3 = NULL;
|
||||
char *libtest_arg4 = NULL;
|
||||
const char *libtest_arg2 = NULL;
|
||||
const char *libtest_arg3 = NULL;
|
||||
const char *libtest_arg4 = NULL;
|
||||
int test_argc;
|
||||
char **test_argv;
|
||||
const char **test_argv;
|
||||
int testnum;
|
||||
|
||||
struct curltime tv_test_start; /* for test timing */
|
||||
@ -98,12 +98,12 @@ char *hexdump(const unsigned char *buf, size_t len)
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
char *URL;
|
||||
const char *URL;
|
||||
CURLcode result;
|
||||
entry_func_t entry_func;
|
||||
char *entry_name;
|
||||
const char *entry_name;
|
||||
char *env;
|
||||
size_t tmp;
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
typedef CURLcode (*entry_func_t)(char *);
|
||||
typedef CURLcode (*entry_func_t)(const char *);
|
||||
|
||||
struct entry_s {
|
||||
const char *name;
|
||||
@ -69,13 +69,13 @@ extern int unitfail; /* for unittests */
|
||||
if((res = curl_multi_setopt((A), (B), (C))) != CURLE_OK) \
|
||||
goto test_cleanup
|
||||
|
||||
extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
|
||||
extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
|
||||
extern char *libtest_arg4; /* set by first.c to the argv[4] or NULL */
|
||||
extern const char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
|
||||
extern const char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
|
||||
extern const char *libtest_arg4; /* set by first.c to the argv[4] or NULL */
|
||||
|
||||
/* argc and argv as passed in to the main() function */
|
||||
extern int test_argc;
|
||||
extern char **test_argv;
|
||||
extern const char **test_argv;
|
||||
extern int testnum;
|
||||
extern struct curltime tv_test_start; /* for test timing */
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ test_cleanup:
|
||||
/* for debugging: */
|
||||
/* #define SINGLETEST 9 */
|
||||
|
||||
static CURLcode test_lib1156(char *URL)
|
||||
static CURLcode test_lib1156(const char *URL)
|
||||
{
|
||||
CURLcode res;
|
||||
CURL *curl;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
static CURLcode test_lib1301(char *URL)
|
||||
static CURLcode test_lib1301(const char *URL)
|
||||
{
|
||||
int rc;
|
||||
(void)URL;
|
||||
|
||||
@ -39,7 +39,7 @@ static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
static CURLcode test_lib1308(char *URL)
|
||||
static CURLcode test_lib1308(const char *URL)
|
||||
{
|
||||
int errorcount = 0;
|
||||
CURLFORMcode rc;
|
||||
|
||||
@ -85,7 +85,7 @@ static size_t t1485_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return len;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1485(char *URL)
|
||||
static CURLcode test_lib1485(const char *URL)
|
||||
{
|
||||
CURL *curls = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1500(char *URL)
|
||||
static CURLcode test_lib1500(const char *URL)
|
||||
{
|
||||
CURL *curls = NULL;
|
||||
CURLM *multi = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1501(char *URL)
|
||||
static CURLcode test_lib1501(const char *URL)
|
||||
{
|
||||
static const long HANG_TIMEOUT = 30 * 1000;
|
||||
/* 500 milliseconds allowed. An extreme number but lets be really
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1502(char *URL)
|
||||
static CURLcode test_lib1502(const char *URL)
|
||||
{
|
||||
CURL *easy = NULL;
|
||||
CURL *dup;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1506(char *URL)
|
||||
static CURLcode test_lib1506(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *curl[NUM_HANDLES] = {0};
|
||||
@ -35,8 +35,8 @@ static CURLcode test_lib1506(char *URL)
|
||||
char target_url[256];
|
||||
char dnsentry[256];
|
||||
struct curl_slist *slist = NULL, *slist2;
|
||||
char *port = libtest_arg3;
|
||||
char *address = libtest_arg2;
|
||||
const char *port = libtest_arg3;
|
||||
const char *address = libtest_arg2;
|
||||
|
||||
(void)URL;
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ static size_t t1507_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return CURL_READFUNC_ABORT;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1507(char *URL)
|
||||
static CURLcode test_lib1507(const char *URL)
|
||||
{
|
||||
static const int MULTI_PERFORM_HANG_TIMEOUT = 60 * 1000;
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1508(char *URL)
|
||||
static CURLcode test_lib1508(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURLM *m = NULL;
|
||||
|
||||
@ -30,7 +30,7 @@ size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream);
|
||||
|
||||
static unsigned long realHeaderSize = 0;
|
||||
|
||||
static CURLcode test_lib1509(char *URL)
|
||||
static CURLcode test_lib1509(const char *URL)
|
||||
{
|
||||
long headerSize;
|
||||
CURLcode code;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1510(char *URL)
|
||||
static CURLcode test_lib1510(const char *URL)
|
||||
{
|
||||
static const int NUM_URLS = 4;
|
||||
|
||||
@ -35,8 +35,8 @@ static CURLcode test_lib1510(char *URL)
|
||||
char target_url[256];
|
||||
char dnsentry[256];
|
||||
struct curl_slist *slist = NULL, *slist2;
|
||||
char *port = libtest_arg3;
|
||||
char *address = libtest_arg2;
|
||||
const char *port = libtest_arg3;
|
||||
const char *address = libtest_arg2;
|
||||
|
||||
(void)URL;
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1511(char *URL)
|
||||
static CURLcode test_lib1511(const char *URL)
|
||||
{
|
||||
long unmet;
|
||||
CURL *curl = NULL;
|
||||
|
||||
@ -32,12 +32,12 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1512(char *URL)
|
||||
static CURLcode test_lib1512(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *curl[2] = {NULL, NULL};
|
||||
char *port = libtest_arg3;
|
||||
char *address = libtest_arg2;
|
||||
const char *port = libtest_arg3;
|
||||
const char *address = libtest_arg2;
|
||||
char dnsentry[256];
|
||||
struct curl_slist *slist = NULL;
|
||||
size_t i;
|
||||
|
||||
@ -47,7 +47,7 @@ static int progressKiller(void *arg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1513(char *URL)
|
||||
static CURLcode test_lib1513(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -52,7 +52,7 @@ static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return 0; /* no more data left to deliver */
|
||||
}
|
||||
|
||||
static CURLcode test_lib1514(char *URL)
|
||||
static CURLcode test_lib1514(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#define DNS_TIMEOUT 1L
|
||||
|
||||
static CURLcode do_one_request(CURLM *m, char *URL, char *resolve)
|
||||
static CURLcode do_one_request(CURLM *m, const char *URL, const char *resolve)
|
||||
{
|
||||
CURL *curls;
|
||||
struct curl_slist *resolve_list = NULL;
|
||||
@ -100,13 +100,13 @@ test_cleanup:
|
||||
return res;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1515(char *URL)
|
||||
static CURLcode test_lib1515(const char *URL)
|
||||
{
|
||||
CURLM *multi = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
char *address = libtest_arg2;
|
||||
char *port = libtest_arg3;
|
||||
char *path = URL;
|
||||
const char *path = URL;
|
||||
const char *address = libtest_arg2;
|
||||
const char *port = libtest_arg3;
|
||||
char dns_entry[256];
|
||||
int i;
|
||||
int count = 2;
|
||||
|
||||
@ -51,7 +51,7 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return tocopy;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1517(char *URL)
|
||||
static CURLcode test_lib1517(const char *URL)
|
||||
{
|
||||
static const char testdata[] =
|
||||
"this is what we post to the silly web server\n";
|
||||
|
||||
@ -37,7 +37,7 @@ static size_t t1518_write_cb(char *buffer, size_t size, size_t nitems,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1518(char *URL)
|
||||
static CURLcode test_lib1518(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -71,7 +71,7 @@ static size_t t1520_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1520(char *URL)
|
||||
static CURLcode test_lib1520(const char *URL)
|
||||
{
|
||||
CURLcode res;
|
||||
CURL *curl;
|
||||
|
||||
@ -45,7 +45,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd,
|
||||
return CURL_SOCKOPT_OK;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1522(char *URL)
|
||||
static CURLcode test_lib1522(const char *URL)
|
||||
{
|
||||
static char g_Data[40 * 1024]; /* POST 40KB */
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ static CURLcode run(CURL *hnd, long limit, long time)
|
||||
return curl_easy_perform(hnd);
|
||||
}
|
||||
|
||||
static CURLcode test_lib1523(char *URL)
|
||||
static CURLcode test_lib1523(const char *URL)
|
||||
{
|
||||
CURLcode ret;
|
||||
CURL *hnd;
|
||||
|
||||
@ -45,7 +45,7 @@ static size_t t1525_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return strlen(t1525_testdata);
|
||||
}
|
||||
|
||||
static CURLcode test_lib1525(char *URL)
|
||||
static CURLcode test_lib1525(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -44,7 +44,7 @@ static size_t t1526_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return strlen(t1526_testdata);
|
||||
}
|
||||
|
||||
static CURLcode test_lib1526(char *URL)
|
||||
static CURLcode test_lib1526(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -44,7 +44,7 @@ static size_t t1527_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return strlen(t1527_testdata);
|
||||
}
|
||||
|
||||
static CURLcode test_lib1527(char *URL)
|
||||
static CURLcode test_lib1527(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1528(char *URL)
|
||||
static CURLcode test_lib1528(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1529(char *URL)
|
||||
static CURLcode test_lib1529(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -36,7 +36,7 @@ static curl_socket_t opensocket(void *clientp,
|
||||
return CURL_SOCKET_BAD;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1530(char *URL)
|
||||
static CURLcode test_lib1530(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1531(char *URL)
|
||||
static CURLcode test_lib1531(const char *URL)
|
||||
{
|
||||
static char const testData[] = ".abc\0xyz";
|
||||
static curl_off_t const testDataSize = sizeof(testData) - 1;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/* Test CURLINFO_RESPONSE_CODE */
|
||||
|
||||
static CURLcode test_lib1532(char *URL)
|
||||
static CURLcode test_lib1532(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
long httpcode;
|
||||
|
||||
@ -123,7 +123,7 @@ static CURLcode perform_and_check_connections(CURL *curl,
|
||||
}
|
||||
|
||||
|
||||
static CURLcode test_lib1533(char *URL)
|
||||
static CURLcode test_lib1533(const char *URL)
|
||||
{
|
||||
struct cb_data data;
|
||||
CURL *curl = NULL;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/* Test CURLINFO_FILETIME */
|
||||
|
||||
static CURLcode test_lib1534(char *URL)
|
||||
static CURLcode test_lib1534(const char *URL)
|
||||
{
|
||||
CURL *curl, *dupe = NULL;
|
||||
long filetime;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/* Test CURLINFO_PROTOCOL */
|
||||
|
||||
static CURLcode test_lib1535(char *URL)
|
||||
static CURLcode test_lib1535(const char *URL)
|
||||
{
|
||||
CURL *curl, *dupe = NULL;
|
||||
long protocol;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
/* Test CURLINFO_SCHEME */
|
||||
|
||||
static CURLcode test_lib1536(char *URL)
|
||||
static CURLcode test_lib1536(const char *URL)
|
||||
{
|
||||
CURL *curl, *dupe = NULL;
|
||||
char *scheme;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1537(char *URL)
|
||||
static CURLcode test_lib1537(const char *URL)
|
||||
{
|
||||
const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1538(char *URL)
|
||||
static CURLcode test_lib1538(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURLcode easyret;
|
||||
|
||||
@ -81,7 +81,7 @@ static size_t t1540_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return CURL_WRITEFUNC_PAUSE;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1540(char *URL)
|
||||
static CURLcode test_lib1540(const char *URL)
|
||||
{
|
||||
CURL *curls = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -108,7 +108,7 @@ static size_t t1541_write_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return size * nmemb;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1541(char *URL)
|
||||
static CURLcode test_lib1541(const char *URL)
|
||||
{
|
||||
CURL *curls = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include "testtrace.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1542(char *URL)
|
||||
static CURLcode test_lib1542(const char *URL)
|
||||
{
|
||||
CURL *easy = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
***************************************************************************/
|
||||
#include "first.h"
|
||||
|
||||
static CURLcode test_lib1545(char *URL)
|
||||
static CURLcode test_lib1545(const char *URL)
|
||||
{
|
||||
CURL *eh = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include <curl/multi.h>
|
||||
|
||||
static CURLcode test_lib1550(char *URL)
|
||||
static CURLcode test_lib1550(const char *URL)
|
||||
{
|
||||
CURLM *handle;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include <curl/multi.h>
|
||||
|
||||
static CURLcode test_lib1551(char *URL)
|
||||
static CURLcode test_lib1551(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1552(char *URL)
|
||||
static CURLcode test_lib1552(const char *URL)
|
||||
{
|
||||
CURL *curls = NULL;
|
||||
CURLM *multi = NULL;
|
||||
|
||||
@ -39,7 +39,7 @@ static int t1553_xferinfo(void *p,
|
||||
return 1; /* fail as fast as we can */
|
||||
}
|
||||
|
||||
static CURLcode test_lib1553(char *URL)
|
||||
static CURLcode test_lib1553(const char *URL)
|
||||
{
|
||||
CURL *curls = NULL;
|
||||
CURLM *multi = NULL;
|
||||
|
||||
@ -56,7 +56,7 @@ static void t1554_test_unlock(CURL *handle, curl_lock_data data, void *useptr)
|
||||
}
|
||||
|
||||
/* test function */
|
||||
static CURLcode test_lib1554(char *URL)
|
||||
static CURLcode test_lib1554(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURLSH *share = NULL;
|
||||
|
||||
@ -53,7 +53,7 @@ static int progressCallback(void *arg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1555(char *URL)
|
||||
static CURLcode test_lib1555(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ static size_t header(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return nmemb * size;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1556(char *URL)
|
||||
static CURLcode test_lib1556(const char *URL)
|
||||
{
|
||||
CURLcode code;
|
||||
CURL *curl = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1557(char *URL)
|
||||
static CURLcode test_lib1557(const char *URL)
|
||||
{
|
||||
CURLM *curlm = NULL;
|
||||
CURL *curl1 = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1558(char *URL)
|
||||
static CURLcode test_lib1558(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *curl = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1559(char *URL)
|
||||
static CURLcode test_lib1559(const char *URL)
|
||||
{
|
||||
static const int EXCESSIVE = 10*1000*1000;
|
||||
|
||||
|
||||
@ -2028,7 +2028,7 @@ err:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1560(char *URL)
|
||||
static CURLcode test_lib1560(const char *URL)
|
||||
{
|
||||
bool has_utf8 = !!getenv("CURL_TEST_HAVE_CODESET_UTF8");
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#define WAKEUP_NUM 10
|
||||
|
||||
static CURLcode test_lib1564(char *URL)
|
||||
static CURLcode test_lib1564(const char *URL)
|
||||
{
|
||||
CURLM *multi = NULL;
|
||||
int numfds;
|
||||
|
||||
@ -85,7 +85,7 @@ test_cleanup:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1565(char *URL)
|
||||
static CURLcode test_lib1565(const char *URL)
|
||||
{
|
||||
int still_running;
|
||||
int num;
|
||||
@ -199,7 +199,7 @@ test_cleanup:
|
||||
}
|
||||
|
||||
#else /* without pthread, this test doesn't work */
|
||||
static CURLcode test_lib1565(char *URL)
|
||||
static CURLcode test_lib1565(const char *URL)
|
||||
{
|
||||
(void)URL;
|
||||
return CURLE_OK;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include <curl/multi.h>
|
||||
|
||||
static CURLcode test_lib1567(char *URL)
|
||||
static CURLcode test_lib1567(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1568(char *URL)
|
||||
static CURLcode test_lib1568(const char *URL)
|
||||
{
|
||||
CURLcode ret;
|
||||
CURL *hnd;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1569(char *URL)
|
||||
static CURLcode test_lib1569(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *hnd;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1571(char *URL)
|
||||
static CURLcode test_lib1571(const char *URL)
|
||||
{
|
||||
CURLcode res;
|
||||
CURL *curl;
|
||||
|
||||
@ -47,7 +47,7 @@ static int t1576_seek_callback(void *ptr, curl_off_t offset, int origin)
|
||||
return CURL_SEEKFUNC_OK;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1576(char *URL)
|
||||
static CURLcode test_lib1576(const char *URL)
|
||||
{
|
||||
CURLcode res;
|
||||
CURL *curl;
|
||||
|
||||
@ -74,7 +74,7 @@ static int t1591_trailers_callback(struct curl_slist **list, void *userdata)
|
||||
}
|
||||
}
|
||||
|
||||
static CURLcode test_lib1591(char *URL)
|
||||
static CURLcode test_lib1591(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_FAILED_INIT;
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include "first.h"
|
||||
|
||||
static CURLcode test_lib1592(char *URL)
|
||||
static CURLcode test_lib1592(const char *URL)
|
||||
{
|
||||
int stillRunning;
|
||||
CURLM *multiHandle = NULL;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1593(char *URL)
|
||||
static CURLcode test_lib1593(const char *URL)
|
||||
{
|
||||
struct curl_slist *header = NULL;
|
||||
long unmet;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1594(char *URL)
|
||||
static CURLcode test_lib1594(const char *URL)
|
||||
{
|
||||
struct curl_slist *header = NULL;
|
||||
curl_off_t retry;
|
||||
|
||||
@ -33,7 +33,7 @@ struct pair {
|
||||
CURLcode *exp;
|
||||
};
|
||||
|
||||
static CURLcode test_lib1597(char *URL)
|
||||
static CURLcode test_lib1597(const char *URL)
|
||||
{
|
||||
CURL *curl = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -52,7 +52,7 @@ static int t1598_trailers_callback(struct curl_slist **list, void *userdata)
|
||||
}
|
||||
}
|
||||
|
||||
static CURLcode test_lib1598(char *URL)
|
||||
static CURLcode test_lib1598(const char *URL)
|
||||
{
|
||||
static const char *post_data = "xxx=yyy&aaa=bbbbb";
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
***************************************************************************/
|
||||
#include "first.h"
|
||||
|
||||
static CURLcode test_lib1599(char *URL)
|
||||
static CURLcode test_lib1599(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -46,7 +46,7 @@ static size_t t1662_read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
|
||||
return 0; /* no more data left to deliver */
|
||||
}
|
||||
|
||||
static CURLcode test_lib1662(char *URL)
|
||||
static CURLcode test_lib1662(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *hnd;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1900(char *URL)
|
||||
static CURLcode test_lib1900(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *hnd = NULL;
|
||||
|
||||
@ -47,7 +47,7 @@ static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1901(char *URL)
|
||||
static CURLcode test_lib1901(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1903(char *URL)
|
||||
static CURLcode test_lib1903(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *ch = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1905(char *URL)
|
||||
static CURLcode test_lib1905(const char *URL)
|
||||
{
|
||||
CURLSH *sh = NULL;
|
||||
CURL *ch = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1906(char *URL)
|
||||
static CURLcode test_lib1906(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
char *url_after = NULL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1907(char *URL)
|
||||
static CURLcode test_lib1907(const char *URL)
|
||||
{
|
||||
char *url_after;
|
||||
CURL *curl;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1908(char *URL)
|
||||
static CURLcode test_lib1908(const char *URL)
|
||||
{
|
||||
CURLcode ret = CURLE_OK;
|
||||
CURL *hnd;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1910(char *URL)
|
||||
static CURLcode test_lib1910(const char *URL)
|
||||
{
|
||||
CURLcode ret = CURLE_OK;
|
||||
CURL *hnd;
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
define not publicly exposed so we set our own */
|
||||
#define MAX_INPUT_LENGTH 8000000
|
||||
|
||||
static CURLcode test_lib1911(char *URL)
|
||||
static CURLcode test_lib1911(const char *URL)
|
||||
{
|
||||
static char testbuf[MAX_INPUT_LENGTH + 2];
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
curl_mfprintf(stderr, "Type mismatch for CURLOPT_%s (expected %s)\n", \
|
||||
name, exp)
|
||||
|
||||
static CURLcode test_lib1912(char *URL)
|
||||
static CURLcode test_lib1912(const char *URL)
|
||||
{
|
||||
/* Only test if GCC typechecking is available */
|
||||
int error = 0;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1913(char *URL)
|
||||
static CURLcode test_lib1913(const char *URL)
|
||||
{
|
||||
CURLcode ret = CURLE_OK;
|
||||
CURL *hnd;
|
||||
|
||||
@ -95,7 +95,7 @@ static CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *e,
|
||||
* Read/write HSTS cache entries via callback.
|
||||
*/
|
||||
|
||||
static CURLcode test_lib1915(char *URL)
|
||||
static CURLcode test_lib1915(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *hnd;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1916(char *URL)
|
||||
static CURLcode test_lib1916(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1918(char *URL)
|
||||
static CURLcode test_lib1918(const char *URL)
|
||||
{
|
||||
const struct curl_easyoption *o;
|
||||
(void)URL;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1919(char *URL)
|
||||
static CURLcode test_lib1919(const char *URL)
|
||||
{
|
||||
CURLcode res = CURLE_OK;
|
||||
CURL *curl;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1933(char *URL)
|
||||
static CURLcode test_lib1933(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1934(char *URL)
|
||||
static CURLcode test_lib1934(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1935(char *URL)
|
||||
static CURLcode test_lib1935(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1936(char *URL)
|
||||
static CURLcode test_lib1936(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1937(char *URL)
|
||||
static CURLcode test_lib1937(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1938(char *URL)
|
||||
static CURLcode test_lib1938(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1939(char *URL)
|
||||
static CURLcode test_lib1939(const char *URL)
|
||||
{
|
||||
CURLM *multi;
|
||||
CURL *easy;
|
||||
|
||||
@ -77,7 +77,7 @@ static void t1940_showem(CURL *easy, int header_request, unsigned int type)
|
||||
}
|
||||
}
|
||||
|
||||
static CURLcode test_lib1940(char *URL)
|
||||
static CURLcode test_lib1940(const char *URL)
|
||||
{
|
||||
CURL *easy = NULL;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -46,7 +46,7 @@ static size_t t1945_write_cb(char *data, size_t n, size_t l, void *userp)
|
||||
return n*l;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1945(char *URL)
|
||||
static CURLcode test_lib1945(const char *URL)
|
||||
{
|
||||
CURL *easy;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -33,7 +33,7 @@ static size_t t1947_write_cb(char *data, size_t n, size_t l, void *userp)
|
||||
return n*l;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1947(char *URL)
|
||||
static CURLcode test_lib1947(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -40,7 +40,7 @@ static size_t put_callback(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return tocopy;
|
||||
}
|
||||
|
||||
static CURLcode test_lib1948(char *URL)
|
||||
static CURLcode test_lib1948(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = CURLE_OK;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1955(char *URL)
|
||||
static CURLcode test_lib1955(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1956(char *URL)
|
||||
static CURLcode test_lib1956(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1957(char *URL)
|
||||
static CURLcode test_lib1957(const char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res = TEST_ERR_MAJOR_BAD;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "memdebug.h"
|
||||
|
||||
static CURLcode test_lib1958(char *URL)
|
||||
static CURLcode test_lib1958(const 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
Loading…
Reference in New Issue
Block a user