mirror of
https://github.com/systemd/systemd.git
synced 2025-03-23 10:50:16 +03:00
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:
parent
423659abb8
commit
1849cb7cb7
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user