]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dns-domain: use CMP() in dns_name_compare_func 9789/head
authorFilipe Brandenburger <filbranden@google.com>
Tue, 7 Aug 2018 02:23:41 +0000 (19:23 -0700)
committerFilipe Brandenburger <filbranden@google.com>
Tue, 7 Aug 2018 02:26:44 +0000 (19:26 -0700)
src/shared/dns-domain.c

index e7730a5175c15c110f665875d62c200bc304fb21..1ecfb77de271c10b740720719eb43e80f52710bf 100644 (file)
@@ -503,7 +503,7 @@ int dns_name_compare_func(const void *a, const void *b) {
                 r = dns_label_unescape_suffix(a, &x, la, sizeof(la));
                 q = dns_label_unescape_suffix(b, &y, lb, sizeof(lb));
                 if (r < 0 || q < 0)
-                        return r - q;
+                        return CMP(r, q);
 
                 r = ascii_strcasecmp_nn(la, r, lb, q);
                 if (r != 0)