tree-wide: "unparseable" → "unparsable"

"unparsable" is the more common spelling. We already pick "movable" over
"moveable". Let's do the same with this pair.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-07-02 09:58:23 +02:00
parent 15e6a6e87b
commit 52e085af82
3 changed files with 15 additions and 15 deletions

View file

@ -839,7 +839,7 @@ int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, const DnsAns
rds = p->size - saved_size; rds = p->size - saved_size;
switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
case DNS_TYPE_SRV: case DNS_TYPE_SRV:
r = dns_packet_append_uint16(p, rr->srv.priority, NULL); r = dns_packet_append_uint16(p, rr->srv.priority, NULL);
@ -1125,7 +1125,7 @@ int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, const DnsAns
case DNS_TYPE_OPT: case DNS_TYPE_OPT:
case DNS_TYPE_OPENPGPKEY: case DNS_TYPE_OPENPGPKEY:
case _DNS_TYPE_INVALID: /* unparseable */ case _DNS_TYPE_INVALID: /* unparsable */
default: default:
r = dns_packet_append_blob(p, rr->generic.data, rr->generic.data_size, NULL); r = dns_packet_append_blob(p, rr->generic.data, rr->generic.data_size, NULL);
@ -1815,8 +1815,8 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, bool *ret_cache_fl
break; break;
} else { } else {
dns_packet_rewind(p, pos); dns_packet_rewind(p, pos);
rr->unparseable = true; rr->unparsable = true;
goto unparseable; goto unparsable;
} }
} }
@ -2059,7 +2059,7 @@ int dns_packet_read_rr(DnsPacket *p, DnsResourceRecord **ret, bool *ret_cache_fl
case DNS_TYPE_OPT: /* we only care about the header of OPT for now. */ case DNS_TYPE_OPT: /* we only care about the header of OPT for now. */
case DNS_TYPE_OPENPGPKEY: case DNS_TYPE_OPENPGPKEY:
default: default:
unparseable: unparsable:
r = dns_packet_read_memdup(p, rdlength, &rr->generic.data, &rr->generic.data_size, NULL); r = dns_packet_read_memdup(p, rdlength, &rr->generic.data, &rr->generic.data_size, NULL);
break; break;

View file

@ -474,11 +474,11 @@ static DnsResourceRecord* dns_resource_record_free(DnsResourceRecord *rr) {
case DNS_TYPE_OPENPGPKEY: case DNS_TYPE_OPENPGPKEY:
default: default:
if (!rr->unparseable) if (!rr->unparsable)
free(rr->generic.data); free(rr->generic.data);
} }
if (rr->unparseable) if (rr->unparsable)
free(rr->generic.data); free(rr->generic.data);
free(rr->wire_format); free(rr->wire_format);
@ -563,10 +563,10 @@ int dns_resource_record_payload_equal(const DnsResourceRecord *a, const DnsResou
/* Check if a and b are the same, but don't look at their keys */ /* Check if a and b are the same, but don't look at their keys */
if (a->unparseable != b->unparseable) if (a->unparsable != b->unparsable)
return 0; return 0;
switch (a->unparseable ? _DNS_TYPE_INVALID : a->key->type) { switch (a->unparsable ? _DNS_TYPE_INVALID : a->key->type) {
case DNS_TYPE_SRV: case DNS_TYPE_SRV:
r = dns_name_equal(a->srv.name, b->srv.name); r = dns_name_equal(a->srv.name, b->srv.name);
@ -828,7 +828,7 @@ const char *dns_resource_record_to_string(DnsResourceRecord *rr) {
dns_resource_key_to_string(rr->key, k, sizeof(k)); dns_resource_key_to_string(rr->key, k, sizeof(k));
switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
case DNS_TYPE_SRV: case DNS_TYPE_SRV:
r = asprintf(&s, "%s %u %u %u %s", r = asprintf(&s, "%s %u %u %u %s",
@ -1175,7 +1175,7 @@ ssize_t dns_resource_record_payload(DnsResourceRecord *rr, void **out) {
assert(rr); assert(rr);
assert(out); assert(out);
switch(rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { switch(rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
case DNS_TYPE_SRV: case DNS_TYPE_SRV:
case DNS_TYPE_PTR: case DNS_TYPE_PTR:
case DNS_TYPE_NS: case DNS_TYPE_NS:
@ -1343,7 +1343,7 @@ void dns_resource_record_hash_func(const DnsResourceRecord *rr, struct siphash *
dns_resource_key_hash_func(rr->key, state); dns_resource_key_hash_func(rr->key, state);
switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
case DNS_TYPE_SRV: case DNS_TYPE_SRV:
siphash24_compress(&rr->srv.priority, sizeof(rr->srv.priority), state); siphash24_compress(&rr->srv.priority, sizeof(rr->srv.priority), state);
@ -1510,9 +1510,9 @@ DnsResourceRecord *dns_resource_record_copy(DnsResourceRecord *rr) {
copy->expiry = rr->expiry; copy->expiry = rr->expiry;
copy->n_skip_labels_signer = rr->n_skip_labels_signer; copy->n_skip_labels_signer = rr->n_skip_labels_signer;
copy->n_skip_labels_source = rr->n_skip_labels_source; copy->n_skip_labels_source = rr->n_skip_labels_source;
copy->unparseable = rr->unparseable; copy->unparsable = rr->unparsable;
switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
case DNS_TYPE_SRV: case DNS_TYPE_SRV:
copy->srv.priority = rr->srv.priority; copy->srv.priority = rr->srv.priority;

View file

@ -102,7 +102,7 @@ struct DnsResourceRecord {
/* How many labels to strip to determine "synthesizing source" of this RR, i.e. the wildcard's immediate parent. -1 if not signed. */ /* How many labels to strip to determine "synthesizing source" of this RR, i.e. the wildcard's immediate parent. -1 if not signed. */
unsigned n_skip_labels_source; unsigned n_skip_labels_source;
bool unparseable:1; bool unparsable:1;
bool wire_format_canonical:1; bool wire_format_canonical:1;
void *wire_format; void *wire_format;