1
0
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:
Lennart Poettering 2016-01-18 20:22:45 +01:00
parent 0f7091e624
commit b6800689e0

View File

@ -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)