1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-12 09:17:44 +03:00

dns-domain: use dns_name_concat()

`dns_name_normalize()` is an alias of `dns_name_concat()`.
For consistency with `dns_name_is_valid_ldh()`, let's use
`dns_name_concat()`.
This commit is contained in:
Yu Watanabe 2022-06-10 09:42:24 +09:00
parent 67225a96e5
commit 8d896617b4

View File

@ -40,8 +40,8 @@ static inline int dns_name_normalize(const char *s, DNSLabelFlags flags, char **
static inline int dns_name_is_valid(const char *s) { static inline int dns_name_is_valid(const char *s) {
int r; int r;
/* dns_name_normalize() verifies as a side effect */ /* dns_name_concat() verifies as a side effect */
r = dns_name_normalize(s, 0, NULL); r = dns_name_concat(s, NULL, 0, NULL);
if (r == -EINVAL) if (r == -EINVAL)
return 0; return 0;
if (r < 0) if (r < 0)