chiark / gitweb /
resolved: fix which return codes we check
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Aug 2014 12:47:35 +0000 (14:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Aug 2014 12:48:18 +0000 (14:48 +0200)
Discovered by Lukas Nykryn

src/resolve/resolved-dns-domain.c

index 6152047..8ed1ecf 100644 (file)
@@ -434,8 +434,8 @@ int dns_name_endswith(const char *name, const char *suffix) {
                         saved_n = n;
 
                 q = dns_label_unescape(&s, ls, sizeof(ls));
-                if (r < 0)
-                        return r;
+                if (q < 0)
+                        return q;
                 w = dns_label_undo_idna(ls, q, ls, sizeof(ls));
                 if (w < 0)
                         return w;