resolved: make counter for n_auxiliary_queries smaller

It can never go above 64, so let's use a narrower type.

Order will be adjusted later to remove holes.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-05-14 16:26:26 +02:00
parent e3e64a1abd
commit e1004d0aba
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -13,6 +13,8 @@
#define QUERIES_MAX 2048
#define AUXILIARY_QUERIES_MAX 64
assert_cc(AUXILIARY_QUERIES_MAX < UINT8_MAX);
static int dns_query_candidate_new(DnsQueryCandidate **ret, DnsQuery *q, DnsScope *s) {
DnsQueryCandidate *c;
+1 -1
View File
@@ -38,7 +38,7 @@ struct DnsQuery {
* TXT+SRV query. */
DnsQuery *auxiliary_for;
LIST_HEAD(DnsQuery, auxiliary_queries);
unsigned n_auxiliary_queries;
uint8_t n_auxiliary_queries;
int auxiliary_result;
/* The question, formatted in IDNA for use on classic DNS, and as UTF8 for use in LLMNR or mDNS. Note