}
}
-static struct Curl_sec_client_mech Curl_krb5_client_mech = {
+static const struct Curl_sec_client_mech Curl_krb5_client_mech = {
"GSSAPI",
sizeof(gss_ctx_id_t),
krb5_init,
static CURLMcode multi_timeout(struct Curl_multi *multi,
long *timeout_ms)
{
- static struct curltime tv_zero = {0, 0};
+ static const struct curltime tv_zero = {0, 0};
if(multi->timetree) {
/* we have a tree of expire times */
struct Curl_tree *t,
struct Curl_tree **removed)
{
- static struct curltime tv_zero = {0, 0};
+ static const struct curltime tv_zero = {0, 0};
struct Curl_tree *x;
if(!t) {
};
/* Array of DECC$* feature names and their desired values. */
-static struct decc_feat_t decc_feat_array[] = {
+static const struct decc_feat_t decc_feat_array[] = {
/* Preserve command-line case with SET PROCESS/PARSE_STYLE=EXTENDED */
{ "DECC$ARGV_PARSE_STYLE", 1 },
/* Preserve case for file names on ODS5 disks. */
CURLUcode ucode;
};
-static struct testcase get_parts_list[] ={
+static const struct testcase get_parts_list[] ={
{"https://user:password@example.net/get?this=and what", "",
CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
{"https://user:password@example.net/ge t?this=and-what", "",
{NULL, NULL, 0, 0, CURLUE_OK},
};
-static struct urltestcase get_url_list[] = {
+static const struct urltestcase get_url_list[] = {
/* IPv4 trickeries */
{"https://16843009", "https://1.1.1.1/", 0, 0, CURLUE_OK},
{"https://0x7f.1", "https://127.0.0.1/", 0, 0, CURLUE_OK},
}
/* !checksrc! disable SPACEBEFORECOMMA 1 */
-static struct setcase set_parts_list[] = {
+static const struct setcase set_parts_list[] = {
{"https://example.com/",
"query=Al2cO3tDkcDZ3EWE5Lh+LX8TPHs,", /* contains '+' */
"https://example.com/?Al2cO3tDkcDZ3EWE5Lh%2bLX8TPHs",
return CURLUE_OK;
}
-static struct redircase set_url_list[] = {
+static const struct redircase set_url_list[] = {
{"http://example.org/static/favicon/wikipedia.ico",
"//fake.example.com/licenses/by-sa/3.0/",
"http://fake.example.com/licenses/by-sa/3.0/",
return error;
}
-static struct querycase append_list[] = {
+static const struct querycase append_list[] = {
{"HTTP://test/?s", "name=joe\x02", "http://test/?s&name=joe%02",
0, CURLU_URLENCODE, CURLUE_OK},
{"HTTP://test/?size=2#f", "name=joe=", "http://test/?size=2&name=joe%3d#f",
const char *exp;
};
-static struct entry preload_hosts[] = {
+static const struct entry preload_hosts[] = {
/* curl turns 39 that day just before 31-bit time_t overflow */
{ "1.example.com", "20370320 01:02:03" },
{ "2.example.com", "20370320 03:02:01" },
time_t output;
};
-static struct dcheck dates[] = {
+static const struct dcheck dates[] = {
{"Sun, 06 Nov 1994 08:49:37 GMT", 784111777 },
{"Sunday, 06-Nov-94 08:49:37 GMT", 784111777 },
{"Sun Nov 6 08:49:37 1994", 784111777 },
{ -1, 0 }
};
-static struct formats formata[] = {
+static const struct formats formata[] = {
{ "netascii", 1 },
{ "octet", 0 },
{ NULL, 0 }
static int validate_access(struct testcase *test, const char *fname, int mode);
-static void sendtftp(struct testcase *test, struct formats *pf);
+static void sendtftp(struct testcase *test, const struct formats *pf);
-static void recvtftp(struct testcase *test, struct formats *pf);
+static void recvtftp(struct testcase *test, const struct formats *pf);
static void nak(int error);
{
char *cp;
int first = 1, ecode;
- struct formats *pf;
+ const struct formats *pf;
char *filename, *mode = NULL;
#ifdef USE_WINSOCK
DWORD recvtimeout, recvtimeoutbak;
/*
* Send the requested file.
*/
-static void sendtftp(struct testcase *test, struct formats *pf)
+static void sendtftp(struct testcase *test, const struct formats *pf)
{
int size;
ssize_t n;
/*
* Receive a file.
*/
-static void recvtftp(struct testcase *test, struct formats *pf)
+static void recvtftp(struct testcase *test, const struct formats *pf)
{
ssize_t n, size;
/* These are volatile to live through a siglongjmp */
const char *output;
};
-static struct checkthis tests[] = {
+static const struct checkthis tests[] = {
{ "ninja://foo@example.com", "ninja://foo@example.com" },
{ "https://foo@example.com", "https://example.com/" },
{ "https://localhost:45", "https://localhost:45/" },
};
-static struct dohrequest req[] = {
+static const struct dohrequest req[] = {
{"test.host.name", DNS_TYPE_A, DNS_Q1, sizeof(DNS_Q1)-1, 0 },
{"test.host.name", DNS_TYPE_AAAA, DNS_Q2, sizeof(DNS_Q2)-1, 0 },
{"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
static const char full49[] = DNS_FOO_EXAMPLE_COM;
-static struct dohresp resp[] = {
+static const struct dohresp resp[] = {
{"\x00\x00", 2, DNS_TYPE_A, DOH_TOO_SMALL_BUFFER, NULL },
{"\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01", 12,
DNS_TYPE_A, DOH_DNS_BAD_ID, NULL },