From fc0e29dd57bb0dc7bbf4d0e5c9638b01f7b6afc6 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Mon, 27 Apr 2020 12:07:34 +0200 Subject: doh: Constify some input pointers Closes #5306 --- tests/unit/unit1650.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/unit/unit1650.c b/tests/unit/unit1650.c index 35ac12c81..502bf9df0 100644 --- a/tests/unit/unit1650.c +++ b/tests/unit/unit1650.c @@ -185,7 +185,7 @@ UNITTEST_START size_t len; int u; memset(&d, 0, sizeof(d)); - rc = doh_decode((unsigned char *)resp[i].packet, resp[i].size, + rc = doh_decode((const unsigned char *)resp[i].packet, resp[i].size, resp[i].type, &d); if(rc != resp[i].rc) { fprintf(stderr, "resp %zu: Expected return code %d got %d\n", i, @@ -241,7 +241,7 @@ UNITTEST_START struct dohentry d; int rc; memset(&d, 0, sizeof(d)); - rc = doh_decode((unsigned char *)full49, i, DNS_TYPE_A, &d); + rc = doh_decode((const unsigned char *)full49, i, DNS_TYPE_A, &d); if(!rc) { /* none of them should work */ fprintf(stderr, "%zu: %d\n", i, rc); @@ -253,7 +253,7 @@ UNITTEST_START struct dohentry d; int rc; memset(&d, 0, sizeof(d)); - rc = doh_decode((unsigned char *)&full49[i], sizeof(full49)-i-1, + rc = doh_decode((const unsigned char *)&full49[i], sizeof(full49)-i-1, DNS_TYPE_A, &d); if(!rc) { /* none of them should work */ @@ -266,7 +266,7 @@ UNITTEST_START struct dohentry d; struct dohaddr *a; memset(&d, 0, sizeof(d)); - rc = doh_decode((unsigned char *)full49, sizeof(full49)-1, + rc = doh_decode((const unsigned char *)full49, sizeof(full49)-1, DNS_TYPE_A, &d); fail_if(d.numaddr != 1, "missing address"); a = &d.addr[0]; -- cgit v1.2.3