diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-07 19:43:26 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-11 19:39:59 +0100 |
commit | b577e3d589ec00f6d96e90b0d4bf344dbd40cd76 (patch) | |
tree | 3ef35c1801ce366abd93012ae338d91f6dbffcdc /src/resolve/resolved-dns-dnssec.c | |
parent | d424da2ae0860268ab863ce8945a425aa79e3826 (diff) |
basic: introduce generic ascii_strlower_n() call and make use of it everywhere
Diffstat (limited to 'src/resolve/resolved-dns-dnssec.c')
-rw-r--r-- | src/resolve/resolved-dns-dnssec.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/resolve/resolved-dns-dnssec.c b/src/resolve/resolved-dns-dnssec.c index e71939d999..d5eda6a6dd 100644 --- a/src/resolve/resolved-dns-dnssec.c +++ b/src/resolve/resolved-dns-dnssec.c @@ -890,8 +890,6 @@ int dnssec_canonicalize(const char *n, char *buffer, size_t buffer_max) { return -ENOBUFS; for (;;) { - size_t i; - r = dns_label_unescape(&n, buffer, buffer_max); if (r < 0) return r; @@ -918,11 +916,7 @@ int dnssec_canonicalize(const char *n, char *buffer, size_t buffer_max) { if (memchr(buffer, '.', r)) return -EINVAL; - for (i = 0; i < (size_t) r; i ++) { - if (buffer[i] >= 'A' && buffer[i] <= 'Z') - buffer[i] = buffer[i] - 'A' + 'a'; - } - + ascii_strlower_n(buffer, (size_t) r); buffer[r] = '.'; buffer += r + 1; |