diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-12-18 19:15:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-12-18 19:15:34 +0100 |
commit | 950b692bfbabf01e92f912450b0c76265c99ae43 (patch) | |
tree | ce3b12aeb261a43a34f72e612723a79fe09a04b2 | |
parent | fd009cd80e511587c6afae59da8aff14e5e18fa3 (diff) |
resolved: use dns_name_parent() where appropriate
-rw-r--r-- | src/resolve/resolved-dns-cache.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c index df397e1ddd..65eff7fda6 100644 --- a/src/resolve/resolved-dns-cache.c +++ b/src/resolve/resolved-dns-cache.c @@ -598,8 +598,6 @@ static DnsCacheItem *dns_cache_get_by_key_follow_cname_dname_nsec(DnsCache *c, D /* OK, let's look for cached DNAME records. */ for (;;) { - char label[DNS_LABEL_MAX]; - if (isempty(n)) return NULL; @@ -608,13 +606,13 @@ static DnsCacheItem *dns_cache_get_by_key_follow_cname_dname_nsec(DnsCache *c, D return i; /* Jump one label ahead */ - r = dns_label_unescape(&n, label, sizeof(label)); + r = dns_name_parent(&n); if (r <= 0) return NULL; } } - if (k-> type != DNS_TYPE_NSEC) { + if (k->type != DNS_TYPE_NSEC) { /* Check if we have an NSEC record instead for the name. */ i = hashmap_get(c->by_key, &DNS_RESOURCE_KEY_CONST(k->class, DNS_TYPE_NSEC, n)); if (i) |