summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-01-29 16:18:12 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-01-29 17:12:48 +0100
commitc805014a350da7c32eb2bdb408a9fa643c191dee (patch)
tree124d7adb12001570cdfefa9587cce4a6f093c426 /src
parent183d5168cf1d2bfbd3049e8592b4ed4c87c94936 (diff)
downloadsystemd-c805014a350da7c32eb2bdb408a9fa643c191dee.tar.gz
resolved: minor cleanups
Diffstat (limited to 'src')
-rw-r--r--src/resolve/resolved-dns-query.c7
-rw-r--r--src/resolve/resolved-dns-query.h16
2 files changed, 11 insertions, 12 deletions
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c
index 757fbedf99..d10a2db9c2 100644
--- a/src/resolve/resolved-dns-query.c
+++ b/src/resolve/resolved-dns-query.c
@@ -50,7 +50,6 @@ static void dns_query_candidate_stop(DnsQueryCandidate *c) {
}
DnsQueryCandidate* dns_query_candidate_free(DnsQueryCandidate *c) {
-
if (!c)
return NULL;
@@ -69,7 +68,7 @@ DnsQueryCandidate* dns_query_candidate_free(DnsQueryCandidate *c) {
}
static int dns_query_candidate_next_search_domain(DnsQueryCandidate *c) {
- DnsSearchDomain *next = NULL;
+ DnsSearchDomain *next;
assert(c);
@@ -602,8 +601,8 @@ static int dns_query_try_etc_hosts(DnsQuery *q) {
assert(q);
- /* Looks in /etc/hosts for matching entries. Note that this is done *before* the normal lookup is done. The
- * data from /etc/hosts hence takes precedence over the network. */
+ /* Looks in /etc/hosts for matching entries. Note that this is done *before* the normal lookup is
+ * done. The data from /etc/hosts hence takes precedence over the network. */
r = manager_etc_hosts_lookup(
q->manager,
diff --git a/src/resolve/resolved-dns-query.h b/src/resolve/resolved-dns-query.h
index 8056aa3727..6aadf28a15 100644
--- a/src/resolve/resolved-dns-query.h
+++ b/src/resolve/resolved-dns-query.h
@@ -31,19 +31,19 @@ struct DnsQueryCandidate {
struct DnsQuery {
Manager *manager;
- /* When resolving a service, we first create a TXT+SRV query,
- * and then for the hostnames we discover auxiliary A+AAAA
- * queries. This pointer always points from the auxiliary
- * queries back to the TXT+SRV query. */
+ /* When resolving a service, we first create a TXT+SRV query, and then for the hostnames we discover
+ * auxiliary A+AAAA queries. This pointer always points from the auxiliary queries back to the
+ * TXT+SRV query. */
DnsQuery *auxiliary_for;
LIST_HEAD(DnsQuery, auxiliary_queries);
unsigned 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 that even
- * on classic DNS some labels might use UTF8 encoding. Specifically, DNS-SD service names (in contrast to their
- * domain suffixes) use UTF-8 encoding even on DNS. Thus, the difference between these two fields is mostly
- * relevant only for explicit *hostname* lookups as well as the domain suffixes of service lookups. */
+ /* The question, formatted in IDNA for use on classic DNS, and as UTF8 for use in LLMNR or mDNS. Note
+ * that even on classic DNS some labels might use UTF8 encoding. Specifically, DNS-SD service names
+ * (in contrast to their domain suffixes) use UTF-8 encoding even on DNS. Thus, the difference
+ * between these two fields is mostly relevant only for explicit *hostname* lookups as well as the
+ * domain suffixes of service lookups. */
DnsQuestion *question_idna;
DnsQuestion *question_utf8;