mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
resolved: minor optimization for dns_question_is_equal()
If the poinetrs are equal, we don't have to do a deep comparison. This is similar to a similar optimization we already have in place for RRs and keys.
This commit is contained in:
parent
0f7091e624
commit
b6800689e0
@ -183,6 +183,9 @@ int dns_question_is_equal(DnsQuestion *a, DnsQuestion *b) {
|
||||
unsigned j;
|
||||
int r;
|
||||
|
||||
if (a == b)
|
||||
return 1;
|
||||
|
||||
if (!a)
|
||||
return !b || b->n_keys == 0;
|
||||
if (!b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user