diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-12-18 09:56:04 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-12-18 12:28:24 +0100 |
commit | e499c9998bb42b792afb1acd3532fe975280c0fd (patch) | |
tree | 21962c20f3026d9bd3388c8b28c85eb4102e4ef3 /src/journal | |
parent | d8ae66d7faee23a74a69119270bf622100705f72 (diff) |
journal: remove redundant variable new_offset
The file's current_offset is already updated at this point, so let's use
it.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/sd-journal.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 7ca0f839c6..8cf6de651e 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -787,7 +787,6 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc static int real_journal_next(sd_journal *j, direction_t direction) { JournalFile *f, *new_file = NULL; - uint64_t new_offset = 0; uint64_t p = 0; Iterator i; Object *o; @@ -819,16 +818,14 @@ static int real_journal_next(sd_journal *j, direction_t direction) { found = direction == DIRECTION_DOWN ? k < 0 : k > 0; } - if (found) { + if (found) new_file = f; - new_offset = p; - } } if (!new_file) return 0; - r = journal_file_move_to_object(new_file, OBJECT_ENTRY, new_offset, &o); + r = journal_file_move_to_object(new_file, OBJECT_ENTRY, new_file->current_offset, &o); if (r < 0) return r; |