mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05: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:
parent
67225a96e5
commit
8d896617b4
@ -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) {
|
||||
int r;
|
||||
|
||||
/* dns_name_normalize() verifies as a side effect */
|
||||
r = dns_name_normalize(s, 0, NULL);
|
||||
/* dns_name_concat() verifies as a side effect */
|
||||
r = dns_name_concat(s, NULL, 0, NULL);
|
||||
if (r == -EINVAL)
|
||||
return 0;
|
||||
if (r < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user