tree-wide: rename cleanup function
... with accordance to the current coding style.
This commit is contained in:
@@ -85,7 +85,7 @@ static void unit_file_preset_rule_done(UnitFilePresetRule *rule) {
|
||||
strv_free(rule->instances);
|
||||
}
|
||||
|
||||
void unit_file_presets_freep(UnitFilePresets *p) {
|
||||
void unit_file_presets_done(UnitFilePresets *p) {
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
@@ -3220,7 +3220,7 @@ static int presets_find_config(RuntimeScope scope, const char *root_dir, char **
|
||||
}
|
||||
|
||||
static int read_presets(RuntimeScope scope, const char *root_dir, UnitFilePresets *presets) {
|
||||
_cleanup_(unit_file_presets_freep) UnitFilePresets ps = {};
|
||||
_cleanup_(unit_file_presets_done) UnitFilePresets ps = {};
|
||||
_cleanup_strv_free_ char **files = NULL;
|
||||
int r;
|
||||
|
||||
@@ -3400,7 +3400,7 @@ static int query_presets(const char *name, const UnitFilePresets *presets, char
|
||||
}
|
||||
|
||||
int unit_file_query_preset(RuntimeScope scope, const char *root_dir, const char *name, UnitFilePresets *cached) {
|
||||
_cleanup_(unit_file_presets_freep) UnitFilePresets tmp = {};
|
||||
_cleanup_(unit_file_presets_done) UnitFilePresets tmp = {};
|
||||
int r;
|
||||
|
||||
if (!cached)
|
||||
@@ -3526,7 +3526,7 @@ int unit_file_preset(
|
||||
|
||||
_cleanup_(install_context_done) InstallContext plus = {}, minus = {};
|
||||
_cleanup_(lookup_paths_free) LookupPaths lp = {};
|
||||
_cleanup_(unit_file_presets_freep) UnitFilePresets presets = {};
|
||||
_cleanup_(unit_file_presets_done) UnitFilePresets presets = {};
|
||||
const char *config_path;
|
||||
int r;
|
||||
|
||||
@@ -3565,7 +3565,7 @@ int unit_file_preset_all(
|
||||
|
||||
_cleanup_(install_context_done) InstallContext plus = {}, minus = {};
|
||||
_cleanup_(lookup_paths_free) LookupPaths lp = {};
|
||||
_cleanup_(unit_file_presets_freep) UnitFilePresets presets = {};
|
||||
_cleanup_(unit_file_presets_done) UnitFilePresets presets = {};
|
||||
const char *config_path = NULL;
|
||||
int r;
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ typedef struct {
|
||||
bool initialized;
|
||||
} UnitFilePresets;
|
||||
|
||||
void unit_file_presets_freep(UnitFilePresets *p);
|
||||
void unit_file_presets_done(UnitFilePresets *p);
|
||||
int unit_file_query_preset(RuntimeScope scope, const char *root_dir, const char *name, UnitFilePresets *cached);
|
||||
|
||||
const char *unit_file_state_to_string(UnitFileState s) _const_;
|
||||
|
||||
@@ -51,7 +51,7 @@ static bool output_show_unit_file(const UnitFileList *u, char **states, char **p
|
||||
|
||||
static int output_unit_file_list(const UnitFileList *units, unsigned c) {
|
||||
_cleanup_(table_unrefp) Table *table = NULL;
|
||||
_cleanup_(unit_file_presets_freep) UnitFilePresets presets = {};
|
||||
_cleanup_(unit_file_presets_done) UnitFilePresets presets = {};
|
||||
int r;
|
||||
|
||||
table = table_new("unit file", "state", "preset");
|
||||
|
||||
Reference in New Issue
Block a user