summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-12-21 22:32:52 +0100
committerLennart Poettering <lennart@poettering.net>2011-12-21 22:32:52 +0100
commit440ee3665e252dc004e356da0f5b51ad26ea2cbe (patch)
tree0c7c37d34343f4bfe5272ef30f1cd0fd54c21c5c /src/journal/journal-file.c
parente4e61fdbed832a2bd3f5dcd47623872d9081599c (diff)
journal: properly handle first inline bisect array entry
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index a0c479fc67..4a006d3bf3 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1218,7 +1218,6 @@ static int generic_array_bisect_plus_one(JournalFile *f,
/* This bisects the array in object 'first', but first checks
* an extra */
-
r = test_object(f, extra, needle);
if (r < 0)
return r;
@@ -1234,6 +1233,11 @@ static int generic_array_bisect_plus_one(JournalFile *f,
if (offset)
*offset = extra;
+
+ if (idx)
+ *idx = 0;
+
+ return 1;
} else if (r == TEST_RIGHT)
return 0;