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:
Rikard Falkeborn 2021-09-22 00:21:03 +02:00 committed by Daniel Stenberg
parent c7aef0a945
commit e75be2c4b2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 20 additions and 20 deletions

View file

@ -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/" },

View file

@ -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 },