mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:23:31 +03:00
cleanup: constify unmodified static structs
Constify a number of static structs that are never modified. Make them const to show this. Closes #7759
This commit is contained in:
parent
c7aef0a945
commit
e75be2c4b2
10 changed files with 20 additions and 20 deletions
|
|
@ -52,7 +52,7 @@ struct checkthis {
|
|||
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/" },
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ struct dohrequest {
|
|||
};
|
||||
|
||||
|
||||
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"
|
||||
|
|
@ -86,7 +86,7 @@ struct dohresp {
|
|||
|
||||
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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue