summaryrefslogtreecommitdiffstats
path: root/src/basic
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-02 09:38:17 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-06 19:01:57 +0100
commit7dfc71399d2286b37cd61975da196acfd29aca83 (patch)
tree2e56478b7950e61aa97e1813843b3011a3e8556a /src/basic
parentresolved: decrease mdns/llmnr priority for the reverse mapping domains (diff)
downloadsystemd-7dfc71399d2286b37cd61975da196acfd29aca83.tar.xz
systemd-7dfc71399d2286b37cd61975da196acfd29aca83.zip
path-lookup: rename lookup_paths_free -> _done
This is stack-allocated, so update to match our usual rules.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/path-lookup.c5
-rw-r--r--src/basic/path-lookup.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
index 1b31a4e23a..fbcb1edadc 100644
--- a/src/basic/path-lookup.c
+++ b/src/basic/path-lookup.c
@@ -776,9 +776,8 @@ int lookup_paths_init_or_warn(LookupPaths *lp, RuntimeScope scope, LookupPathsFl
return r;
}
-void lookup_paths_free(LookupPaths *lp) {
- if (!lp)
- return;
+void lookup_paths_done(LookupPaths *lp) {
+ assert(lp);
lp->search_path = strv_free(lp->search_path);
diff --git a/src/basic/path-lookup.h b/src/basic/path-lookup.h
index 11db264c01..0db2c5a98c 100644
--- a/src/basic/path-lookup.h
+++ b/src/basic/path-lookup.h
@@ -65,7 +65,7 @@ bool path_is_user_data_dir(const char *path);
bool path_is_user_config_dir(const char *path);
void lookup_paths_log(LookupPaths *p);
-void lookup_paths_free(LookupPaths *p);
+void lookup_paths_done(LookupPaths *p);
char **generator_binary_paths(RuntimeScope scope);
char **env_generator_binary_paths(RuntimeScope scope);