From dcf1c14b95e6b52eae8c52ea6e2e39a61400c637 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 16 Apr 2025 05:38:13 +0900 Subject: [PATCH] resolve: use set_dump_sorted() at one more place --- src/resolve/resolved-dns-trust-anchor.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/resolve/resolved-dns-trust-anchor.c b/src/resolve/resolved-dns-trust-anchor.c index 18059379a17..416eb942940 100644 --- a/src/resolve/resolved-dns-trust-anchor.c +++ b/src/resolve/resolved-dns-trust-anchor.c @@ -14,7 +14,6 @@ #include "resolved-dns-dnssec.h" #include "resolved-dns-trust-anchor.h" #include "set.h" -#include "sort-util.h" #include "string-util.h" #include "strv.h" @@ -477,10 +476,6 @@ static int dns_trust_anchor_load_files( return 0; } -static int domain_name_cmp(char * const *a, char * const *b) { - return dns_name_compare_func(*a, *b); -} - static int dns_trust_anchor_dump(DnsTrustAnchor *d) { DnsAnswer *a; @@ -503,12 +498,9 @@ static int dns_trust_anchor_dump(DnsTrustAnchor *d) { else { _cleanup_free_ char **l = NULL, *j = NULL; - l = set_get_strv(d->negative_by_name); - if (!l) + if (set_dump_sorted(d->negative_by_name, (void***) &l, /* ret_n = */ NULL) < 0) return log_oom(); - typesafe_qsort(l, set_size(d->negative_by_name), domain_name_cmp); - j = strv_join(l, " "); if (!j) return log_oom(); -- 2.47.3