summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-12-17 15:45:10 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-12-18 14:41:22 +0100
commitf534928ad7aaeec0bec2d653b4a50e79b0fc8418 (patch)
tree95291bbdb8e1ede9566dd57e9aae4c1d6e60ef4d /src/journal/journal-file.c
parent7943f42275025e1b6642b580b19b24dfab8dee61 (diff)
journal: journal_file_next_entry() does not need pointer to current Object
The current offset is sufficient information.
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 35f3ea92a4..fec54f31b9 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2003,7 +2003,7 @@ int journal_file_compare_locations(JournalFile *af, JournalFile *bf) {
int journal_file_next_entry(
JournalFile *f,
- Object *o, uint64_t p,
+ uint64_t p,
direction_t direction,
Object **ret, uint64_t *offset) {
@@ -2011,18 +2011,14 @@ int journal_file_next_entry(
int r;
assert(f);
- assert(p > 0 || !o);
n = le64toh(f->header->n_entries);
if (n <= 0)
return 0;
- if (!o)
+ if (p == 0)
i = direction == DIRECTION_DOWN ? 0 : n - 1;
else {
- if (o->object.type != OBJECT_ENTRY)
- return -EINVAL;
-
r = generic_array_bisect(f,
le64toh(f->header->entry_array_offset),
le64toh(f->header->n_entries),