summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-journal/journal-file.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-06-27 04:53:43 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-06-28 20:42:37 +0200
commit31fdd89fc69944a4b75d561ed0da59921c82428f (patch)
tree5550961f8f3247954d50a2fdde7e1823784bd951 /src/libsystemd/sd-journal/journal-file.c
parentsd-journal: shorten code a bit (diff)
downloadsystemd-31fdd89fc69944a4b75d561ed0da59921c82428f.tar.xz
systemd-31fdd89fc69944a4b75d561ed0da59921c82428f.zip
sd-journal: drop unused argument from journal_file_check_object()
And rename the function.
Diffstat (limited to '')
-rw-r--r--src/libsystemd/sd-journal/journal-file.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c
index 517b01543f..bdc234504e 100644
--- a/src/libsystemd/sd-journal/journal-file.c
+++ b/src/libsystemd/sd-journal/journal-file.c
@@ -651,8 +651,7 @@ static uint64_t minimum_header_size(Object *o) {
/* Lightweight object checks. We want this to be fast, so that we won't
* slowdown every journal_file_move_to_object() call too much. */
-static int journal_file_check_object(JournalFile *f, uint64_t offset, Object *o) {
- assert(f);
+static int check_object(Object *o, uint64_t offset) {
assert(o);
switch (o->object.type) {
@@ -850,7 +849,7 @@ int journal_file_move_to_object(JournalFile *f, ObjectType type, uint64_t offset
if (r < 0)
return r;
- r = journal_file_check_object(f, offset, o);
+ r = check_object(o, offset);
if (r < 0)
return r;
@@ -921,7 +920,7 @@ int journal_file_read_object_header(JournalFile *f, ObjectType type, uint64_t of
"Attempt to read object of unexpected type: %" PRIu64,
offset);
- r = journal_file_check_object(f, offset, &o);
+ r = check_object(&o, offset);
if (r < 0)
return r;