mirror of
https://github.com/curl/curl.git
synced 2026-08-01 02:48:03 +03:00
parent
cad15b9f92
commit
fc0e29dd57
3 changed files with 19 additions and 17 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue