diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-13 19:51:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-13 20:22:32 +0100 |
commit | f6fbd9c21ff4906c0bbd9ab95281658a9d1307b3 (patch) | |
tree | 7d9be80382edbb7c79294fce4557e55a24bb2a76 /src | |
parent | c174983474d4a010a18e3bb9a59e351a442480f5 (diff) |
shared: simplify dns_name_is_single_label() by using dns_name_parent() to skip first label
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/dns-domain.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c index a127e594ac..ef81341eca 100644 --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c @@ -912,12 +912,11 @@ bool dns_name_is_root(const char *name) { } bool dns_name_is_single_label(const char *name) { - char label[DNS_LABEL_MAX+1]; int r; assert(name); - r = dns_label_unescape(&name, label, sizeof(label)); + r = dns_name_parent(&name); if (r <= 0) return false; |