From: Lennart Poettering Date: Wed, 21 Dec 2011 21:32:52 +0000 (+0100) Subject: journal: properly handle first inline bisect array entry X-Git-Tag: v38~144^2~18 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=440ee3665e252dc004e356da0f5b51ad26ea2cbe journal: properly handle first inline bisect array entry --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index a0c479fc6..4a006d3bf 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;