diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-25 13:46:52 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-25 13:46:52 +0900 |
commit | 6da95857c19202120af76871c91a47a0f23aed8d (patch) | |
tree | 4a584251270a1e1a338e8e405a0007b7e250bf31 /src/resolve/resolved-dns-query.c | |
parent | fa6a69d7837f1d5fcd0ba279b51a41a26badaf03 (diff) | |
download | systemd-6da95857c19202120af76871c91a47a0f23aed8d.tar.gz |
resolve: drop dead code
Diffstat (limited to 'src/resolve/resolved-dns-query.c')
-rw-r--r-- | src/resolve/resolved-dns-query.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c index c921fe841f..746ff1b8be 100644 --- a/src/resolve/resolved-dns-query.c +++ b/src/resolve/resolved-dns-query.c @@ -554,17 +554,13 @@ static int dns_query_add_candidate(DnsQuery *q, DnsScope *s) { return r; /* If this a single-label domain on DNS, we might append a suitable search domain first. */ - if ((q->flags & SD_RESOLVED_NO_SEARCH) == 0) { - r = dns_scope_name_needs_search_domain(s, dns_question_first_name(q->question_idna)); - if (r < 0) - goto fail; - if (r > 0) { - /* OK, we need a search domain now. Let's find one for this scope */ + if ((q->flags & SD_RESOLVED_NO_SEARCH) == 0 && + dns_scope_name_needs_search_domain(s, dns_question_first_name(q->question_idna))) { + /* OK, we need a search domain now. Let's find one for this scope */ - r = dns_query_candidate_next_search_domain(c); - if (r <= 0) /* if there's no search domain, then we won't add any transaction. */ - goto fail; - } + r = dns_query_candidate_next_search_domain(c); + if (r <= 0) /* if there's no search domain, then we won't add any transaction. */ + goto fail; } r = dns_query_candidate_setup_transactions(c); |