mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user