]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: drop dead code
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Jun 2018 04:46:52 +0000 (13:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Jun 2018 04:46:52 +0000 (13:46 +0900)
src/resolve/resolved-dns-query.c

index c921fe841fedba409b54d3ecfc6e42cf95d6f9a3..746ff1b8bec93bc254f0f889c2c015d86875763f 100644 (file)
@@ -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);