From 52e085af8286fe629b705df0b50861523bb50c57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 2 Jul 2020 09:58:23 +0200 Subject: [PATCH] =?utf8?q?tree-wide:=20"unparseable"=20=E2=86=92=20"unpars?= =?utf8?q?able"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit "unparsable" is the more common spelling. We already pick "movable" over "moveable". Let's do the same with this pair. --- src/resolve/resolved-dns-packet.c | 10 +++++----- src/resolve/resolved-dns-rr.c | 18 +++++++++--------- src/resolve/resolved-dns-rr.h | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 7a80240b970..63ede724734 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -839,7 +839,7 @@ int dns_packet_append_rr(DnsPacket *p, const DnsResourceRecord *rr, const DnsAns 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: 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_OPENPGPKEY: - case _DNS_TYPE_INVALID: /* unparseable */ + case _DNS_TYPE_INVALID: /* unparsable */ default: 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; } else { dns_packet_rewind(p, pos); - rr->unparseable = true; - goto unparseable; + rr->unparsable = true; + 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_OPENPGPKEY: default: - unparseable: + unparsable: r = dns_packet_read_memdup(p, rdlength, &rr->generic.data, &rr->generic.data_size, NULL); break; diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c index 6ba26a24b2c..fa43dd089d4 100644 --- a/src/resolve/resolved-dns-rr.c +++ b/src/resolve/resolved-dns-rr.c @@ -474,11 +474,11 @@ static DnsResourceRecord* dns_resource_record_free(DnsResourceRecord *rr) { case DNS_TYPE_OPENPGPKEY: default: - if (!rr->unparseable) + if (!rr->unparsable) free(rr->generic.data); } - if (rr->unparseable) + if (rr->unparsable) free(rr->generic.data); 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 */ - if (a->unparseable != b->unparseable) + if (a->unparsable != b->unparsable) return 0; - switch (a->unparseable ? _DNS_TYPE_INVALID : a->key->type) { + switch (a->unparsable ? _DNS_TYPE_INVALID : a->key->type) { case DNS_TYPE_SRV: 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)); - switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { + switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) { case DNS_TYPE_SRV: 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(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_PTR: 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); - switch (rr->unparseable ? _DNS_TYPE_INVALID : rr->key->type) { + switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) { case DNS_TYPE_SRV: 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->n_skip_labels_signer = rr->n_skip_labels_signer; 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: copy->srv.priority = rr->srv.priority; diff --git a/src/resolve/resolved-dns-rr.h b/src/resolve/resolved-dns-rr.h index 291447f00e7..6c824f7962e 100644 --- a/src/resolve/resolved-dns-rr.h +++ b/src/resolve/resolved-dns-rr.h @@ -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. */ unsigned n_skip_labels_source; - bool unparseable:1; + bool unparsable:1; bool wire_format_canonical:1; void *wire_format; -- 2.47.3