1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

resolved: make use of set_put_strdupv() where appropriate

This commit is contained in:
Lennart Poettering 2016-06-15 22:32:33 +02:00
parent 6f7da49d00
commit 39f259e0b8

View File

@ -341,7 +341,6 @@ clear:
static int link_update_dnssec_negative_trust_anchors(Link *l) {
_cleanup_strv_free_ char **ntas = NULL;
_cleanup_set_free_free_ Set *ns = NULL;
char **i;
int r;
assert(l);
@ -358,11 +357,9 @@ static int link_update_dnssec_negative_trust_anchors(Link *l) {
if (!ns)
return -ENOMEM;
STRV_FOREACH(i, ntas) {
r = set_put_strdup(ns, *i);
r = set_put_strdupv(ns, ntas);
if (r < 0)
return r;
}
set_free_free(l->dnssec_negative_trust_anchors);
l->dnssec_negative_trust_anchors = ns;
@ -379,6 +376,9 @@ static int link_update_search_domain_one(Link *l, const char *name, bool route_o
DnsSearchDomain *d;
int r;
assert(l);
assert(name);
r = dns_search_domain_find(l->search_domains, name, &d);
if (r < 0)
return r;