summaryrefslogtreecommitdiffstats
path: root/src/shared/dns-domain.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-13 19:51:09 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-13 20:22:32 +0100
commitf6fbd9c21ff4906c0bbd9ab95281658a9d1307b3 (patch)
tree7d9be80382edbb7c79294fce4557e55a24bb2a76 /src/shared/dns-domain.c
parentbasic: add ascii_strcasecmp_nn() call (diff)
downloadsystemd-f6fbd9c21ff4906c0bbd9ab95281658a9d1307b3.tar.xz
systemd-f6fbd9c21ff4906c0bbd9ab95281658a9d1307b3.zip
shared: simplify dns_name_is_single_label() by using dns_name_parent() to skip first label
Diffstat (limited to 'src/shared/dns-domain.c')
-rw-r--r--src/shared/dns-domain.c3
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;