summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-12 17:36:51 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-13 00:32:32 +0200
commit91a31dde6e92c0d4c42abadf970083f6faba87ec (patch)
treec8e4c1092d9e6dfc9de086943dc0515511dc8cfb
parentecf68b1d3833c2ee3156a813ad42cf155dc4ace4 (diff)
journal: fix seeking by realtime/seqnum
-rw-r--r--src/journal/journal-file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 83f603ac82..9665a0535b 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1611,8 +1611,10 @@ int journal_file_move_to_entry_by_seqnum_for_data(
Object *d;
int r;
+ assert(f);
+
r = journal_file_move_to_object(f, OBJECT_DATA, data_offset, &d);
- if (r <= 0)
+ if (r < 0)
return r;
return generic_array_bisect_plus_one(f,
@@ -1635,8 +1637,10 @@ int journal_file_move_to_entry_by_realtime_for_data(
Object *d;
int r;
+ assert(f);
+
r = journal_file_move_to_object(f, OBJECT_DATA, data_offset, &d);
- if (r <= 0)
+ if (r < 0)
return r;
return generic_array_bisect_plus_one(f,