summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1405434)
Also, simplify things a bit and make sure we don't forget looking at one
of the entries.
return r;
strv_uniq(*domains);
return r;
strv_uniq(*domains);
-
- if (strv_isempty(*domains))
- network->wildcard_domain = false;
- else if (strv_find(*domains, "*"))
- network->wildcard_domain = true;
+ network->wildcard_domain = !!strv_find(*domains, "*");
STRV_FOREACH(domain, *domains)
STRV_FOREACH(domain, *domains)
- if (is_localhost(*domain) || !hostname_is_valid(*domain))
+ if (is_localhost(*domain) || !hostname_is_valid(*domain) || streq(*domain, "*")) {
strv_remove(*domains, *domain);
strv_remove(*domains, *domain);
+ /* We removed one entry, make sure we don't skip the next one */
+ domain--;
+ }
+