resolved: don't check for NULL DnsAnswer object explicitly where unnecessary

The DNS_ANSWER_FOREACH macros do this internally anyway, no need to
duplicate this.
This commit is contained in:
Lennart Poettering 2015-12-18 14:29:32 +01:00
parent 423659abb8
commit 1849cb7cb7

View file

@ -233,9 +233,6 @@ int dns_answer_find_soa(DnsAnswer *a, const DnsResourceKey *key, DnsResourceReco
assert(key);
if (!a)
return 0;
/* For a SOA record we can never find a matching SOA record */
if (key->type == DNS_TYPE_SOA)
return 0;
@ -260,9 +257,6 @@ int dns_answer_find_cname_or_dname(DnsAnswer *a, const DnsResourceKey *key, DnsR
assert(key);
if (!a)
return 0;
/* For a {C,D}NAME record we can never find a matching {C,D}NAME record */
if (key->type == DNS_TYPE_CNAME || key->type == DNS_TYPE_DNAME)
return 0;