diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-01-24 09:51:58 +0100 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-01-24 14:29:11 +0100 |
commit | 2d708781620239c9d1f9828a39f8761acf6350b2 (patch) | |
tree | a97cc7c3b09b336f4aeae7285e3a15e7af51120f /src/import | |
parent | macro: rename VA_ARGS_FOREACH to FOREACH_ARGUMENT (diff) | |
download | systemd-2d708781620239c9d1f9828a39f8761acf6350b2.tar.xz systemd-2d708781620239c9d1f9828a39f8761acf6350b2.zip |
tree-wide: replace FOREACH_POINTER with FOREACH_ARGUMENT
The latter is more generic and while being compatible with
the former.
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/pull-common.c | 4 | ||||
-rw-r--r-- | src/import/pull-raw.c | 22 | ||||
-rw-r--r-- | src/import/pull-tar.c | 12 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 5e1ea20a03..37387a76e0 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -550,7 +550,6 @@ int pull_verify(ImportVerify verify, log_debug("Main download is a checksum file, can't validate its checksum with itself, skipping."); verify_job = main_job; } else { - PullJob *j; assert(main_job->calc_checksum); assert(main_job->checksum); assert(checksum_job); @@ -560,7 +559,8 @@ int pull_verify(ImportVerify verify, return log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Checksum is empty, cannot verify."); - FOREACH_POINTER(j, main_job, settings_job, roothash_job, roothash_signature_job, verity_job) { + PullJob *j; + FOREACH_ARGUMENT(j, main_job, settings_job, roothash_job, roothash_signature_job, verity_job) { r = verify_one(checksum_job, j); if (r < 0) return r; diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c index 66c3f65665..dc5434cd2d 100644 --- a/src/import/pull-raw.c +++ b/src/import/pull-raw.c @@ -495,7 +495,6 @@ static int raw_pull_rename_auxiliary_file( static void raw_pull_job_on_finished(PullJob *j) { RawPull *i; - PullJob *jj; int r; assert(j); @@ -568,8 +567,9 @@ static void raw_pull_job_on_finished(PullJob *j) { } } + PullJob *jj; /* Let's close these auxiliary files now, we don't need access to them anymore. */ - FOREACH_POINTER(jj, i->settings_job, i->roothash_job, i->roothash_signature_job, i->verity_job) + FOREACH_ARGUMENT(jj, i->settings_job, i->roothash_job, i->roothash_signature_job, i->verity_job) pull_job_close_disk_fd(jj); if (!i->raw_job->etag_exists) { @@ -820,7 +820,6 @@ int raw_pull_start( ImportVerify verify, const char *checksum) { - PullJob *j; int r; assert(i); @@ -959,14 +958,15 @@ int raw_pull_start( return r; } - FOREACH_POINTER(j, - i->raw_job, - i->checksum_job, - i->signature_job, - i->settings_job, - i->roothash_job, - i->roothash_signature_job, - i->verity_job) { + PullJob *j; + FOREACH_ARGUMENT(j, + i->raw_job, + i->checksum_job, + i->signature_job, + i->settings_job, + i->roothash_job, + i->roothash_signature_job, + i->verity_job) { if (!j) continue; diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index c32fc29014..9e185c255a 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -581,7 +581,6 @@ int tar_pull_start( ImportVerify verify, const char *checksum) { - PullJob *j; int r; assert(i); @@ -656,11 +655,12 @@ int tar_pull_start( return r; } - FOREACH_POINTER(j, - i->tar_job, - i->checksum_job, - i->signature_job, - i->settings_job) { + PullJob *j; + FOREACH_ARGUMENT(j, + i->tar_job, + i->checksum_job, + i->signature_job, + i->settings_job) { if (!j) continue; |