tree-wide: use _cleanup_set_free_ and friends

Instead of _cleanup_(set_freep) or so.
This commit is contained in:
Yu Watanabe
2023-05-28 22:33:44 +09:00
parent 64377c6089
commit 5d2a48da12
52 changed files with 94 additions and 94 deletions

View File

@@ -72,7 +72,7 @@ static int resource_load_from_directory(
Resource *rr,
mode_t m) {
_cleanup_(closedirp) DIR *d = NULL;
_cleanup_closedir_ DIR *d = NULL;
int r;
assert(rr);
@@ -242,7 +242,7 @@ static int download_manifest(
size_t *ret_size) {
_cleanup_free_ char *buffer = NULL, *suffixed_url = NULL;
_cleanup_(close_pairp) int pfd[2] = PIPE_EBADF;
_cleanup_close_pair_ int pfd[2] = PIPE_EBADF;
_cleanup_fclose_ FILE *manifest = NULL;
size_t size = 0;
pid_t pid;

View File

@@ -570,7 +570,7 @@ int transfer_resolve_paths(
}
static void transfer_remove_temporary(Transfer *t) {
_cleanup_(closedirp) DIR *d = NULL;
_cleanup_closedir_ DIR *d = NULL;
int r;
assert(t);

View File

@@ -1093,7 +1093,7 @@ static int component_name_valid(const char *c) {
static int verb_components(int argc, char **argv, void *userdata) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
_cleanup_(set_freep) Set *names = NULL;
_cleanup_set_free_ Set *names = NULL;
_cleanup_free_ char **z = NULL; /* We use simple free() rather than strv_free() here, since set_free() will free the strings for us */
char **l = CONF_PATHS_STRV("");
bool has_default_component = false;