summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-15 22:32:33 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-21 13:20:48 +0200
commit39f259e0b89da8e925c98a8571868848264c4bde (patch)
tree494fe20152fb2f8dd7f607b360946b6841503c56 /src/resolve/resolved-link.c
parent6f7da49d000637d164bb4b0b4d6964c3abb198de (diff)
resolved: make use of set_put_strdupv() where appropriate
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r--src/resolve/resolved-link.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index b189c21920..97b5f60545 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -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);
- if (r < 0)
- return r;
- }
+ 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;