From: Yu Watanabe Date: Thu, 21 Dec 2023 16:28:44 +0000 (+0900) Subject: sd-journal: use FOREACH_ARRAY() at one more place X-Git-Tag: v256-rc1~1433^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30567%2Fhead;p=thirdparty%2Fsystemd.git sd-journal: use FOREACH_ARRAY() at one more place --- diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c index 6b9ff0a4ed8..f2a0c666703 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -932,8 +932,8 @@ static int real_journal_next(sd_journal *j, direction_t direction) { if (r < 0) return r; - for (unsigned i = 0; i < n_files; i++) { - JournalFile *f = (JournalFile *)files[i]; + FOREACH_ARRAY(_f, files, n_files) { + JournalFile *f = (JournalFile*) *_f; bool found; r = next_beyond_location(j, f, direction);