dns_name_is_empty() was added later, but does the same thing as the more
accurately called dns_name_is_root(), hence drop the former.
DnsScopeMatch m;
int n_best = -1;
- if (dns_name_is_empty(domain)) {
+ if (dns_name_is_root(domain)) {
DnsResourceKey *t;
bool found = false;
- /* Refuse empty name if only A and/or AAAA records are requested. */
+ /* Refuse root name if only A and/or AAAA records are requested. */
DNS_QUESTION_FOREACH(t, question)
if (!IN_SET(t->type, DNS_TYPE_A, DNS_TYPE_AAAA)) {
name = dns_resource_key_name(key);
- if (dns_name_is_empty(name)) {
+ if (dns_name_is_root(name)) {
/* Do nothing. */
} else if (dns_name_dont_resolve(name)) {
}
bool dns_name_is_root(const char *name) {
-
assert(name);
/* There are exactly two ways to encode the root domain name:
return 1;
}
-static inline bool dns_name_is_empty(const char *s) {
- return isempty(s) || streq(s, ".");
-}
-
void dns_name_hash_func(const char *s, struct siphash *state);
int dns_name_compare_func(const char *a, const char *b);
extern const struct hash_ops dns_name_hash_ops;