summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-09-11 16:06:57 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-09-11 21:36:36 +0200
commitda8540583d99a231050cf7937c38cb8d8ced2c5e (patch)
tree1895689006358422ff30d19682c1f02e94fa87f8 /src/resolve
parentMerge pull request #34373 from poettering/resolved-dnssd-move-out (diff)
downloadsystemd-da8540583d99a231050cf7937c38cb8d8ced2c5e.tar.xz
systemd-da8540583d99a231050cf7937c38cb8d8ced2c5e.zip
resolvectl: rename shallow destructors …_done()
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolvectl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
index 5c02823736..c42de47a25 100644
--- a/src/resolve/resolvectl.c
+++ b/src/resolve/resolvectl.c
@@ -1617,7 +1617,9 @@ typedef struct GlobalInfo {
bool dnssec_supported;
} GlobalInfo;
-static void link_info_clear(LinkInfo *p) {
+static void link_info_done(LinkInfo *p) {
+ assert(p);
+
free(p->current_dns);
free(p->current_dns_ex);
strv_free(p->dns);
@@ -1626,7 +1628,9 @@ static void link_info_clear(LinkInfo *p) {
strv_free(p->ntas);
}
-static void global_info_clear(GlobalInfo *p) {
+static void global_info_done(GlobalInfo *p) {
+ assert(p);
+
free(p->current_dns);
free(p->current_dns_ex);
strv_free(p->dns);
@@ -1726,7 +1730,7 @@ static int status_ifindex(sd_bus *bus, int ifindex, const char *name, StatusMode
};
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- _cleanup_(link_info_clear) LinkInfo link_info = {};
+ _cleanup_(link_info_done) LinkInfo link_info = {};
_cleanup_(table_unrefp) Table *table = NULL;
_cleanup_free_ char *p = NULL;
char ifi[DECIMAL_STR_MAX(int)], ifname[IF_NAMESIZE];
@@ -2008,7 +2012,7 @@ static int status_global(sd_bus *bus, StatusMode mode, bool *empty_line) {
};
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- _cleanup_(global_info_clear) GlobalInfo global_info = {};
+ _cleanup_(global_info_done) GlobalInfo global_info = {};
_cleanup_(table_unrefp) Table *table = NULL;
int r;