From 440ee3665e252dc004e356da0f5b51ad26ea2cbe Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 Dec 2011 22:32:52 +0100 Subject: [PATCH] journal: properly handle first inline bisect array entry --- src/journal/journal-file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index a0c479fc..4a006d3b 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; -- 2.39.5