resolve: use set_put_strdup_full() to specify hash_ops

This commit is contained in:
Yu Watanabe
2025-05-08 05:58:33 +09:00
parent 16c7555e1a
commit 472379925c
2 changed files with 2 additions and 10 deletions
+1 -5
View File
@@ -675,10 +675,6 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
if (r < 0)
return r;
ns = set_new(&dns_name_hash_ops_free);
if (!ns)
return -ENOMEM;
r = sd_bus_message_read_strv(message, &ntas);
if (r < 0)
return r;
@@ -691,7 +687,7 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS,
"Invalid negative trust anchor domain: %s", *i);
r = set_put_strdup(&ns, *i);
r = set_put_strdup_full(&ns, &dns_name_hash_ops_free, *i);
if (r < 0)
return r;
+1 -5
View File
@@ -477,11 +477,7 @@ static int link_update_dnssec_negative_trust_anchors(Link *l) {
if (r < 0)
return r;
ns = set_new(&dns_name_hash_ops_free);
if (!ns)
return -ENOMEM;
r = set_put_strdupv(&ns, ntas);
r = set_put_strdupv_full(&ns, &dns_name_hash_ops_free, ntas);
if (r < 0)
return r;