]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-journal: merge journal_file_next_entry_for_data() with generic_array_get_plus_one() 29384/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 27 Sep 2023 05:52:21 +0000 (14:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 30 Sep 2023 11:10:15 +0000 (20:10 +0900)
commitd37eeabc4febf0340c32e01afb5c0cab2224bd98
tree18719b999df25f9724dcd04f48f07a1eb4c12523
parent3a23e41883822671254a046d3b007b5afc9a6c7a
sd-journal: merge journal_file_next_entry_for_data() with generic_array_get_plus_one()

Because journal_file_next_entry_for_data() provides the first entry, while
journal_file_next_entry() actually provides the next entry of the input,
this also renames it to journal_file_move_to_entry_for_data().

Also, previously, on DIRECTION_UP the function did not fall back to the
'extra' entry when all entries linked in the chained array are broken.
This also fixes the issue, and now it fall back to the extra entry.
src/journal/test-journal.c
src/libsystemd/sd-journal/journal-file.c
src/libsystemd/sd-journal/journal-file.h
src/libsystemd/sd-journal/sd-journal.c