mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
resolved: add minor optimization path to dns_answer_merge()
This commit is contained in:
parent
02c205359b
commit
032b398224
@ -321,6 +321,11 @@ int dns_answer_merge(DnsAnswer *a, DnsAnswer *b, DnsAnswer **ret) {
|
||||
|
||||
assert(ret);
|
||||
|
||||
if (a == b) {
|
||||
*ret = dns_answer_ref(a);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dns_answer_size(a) <= 0) {
|
||||
*ret = dns_answer_ref(b);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user