diff options
Diffstat (limited to 'src/resolve/resolved-dns-packet.c')
-rw-r--r-- | src/resolve/resolved-dns-packet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 097942ee0a..2cc606f363 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -2339,11 +2339,11 @@ static void dns_packet_hash_func(const void *p, struct siphash *state) { static int dns_packet_compare_func(const void *a, const void *b) { const DnsPacket *x = a, *y = b; + int r; - if (x->size < y->size) - return -1; - if (x->size > y->size) - return 1; + r = CMP(x->size, y->size); + if (r != 0) + return r; return memcmp(DNS_PACKET_DATA((DnsPacket*) x), DNS_PACKET_DATA((DnsPacket*) y), x->size); } |