1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

journal: properly handle first inline bisect array entry

This commit is contained in:
Lennart Poettering 2011-12-21 22:32:52 +01:00
parent e4e61fdbed
commit 440ee3665e

View File

@ -1218,7 +1218,6 @@ static int generic_array_bisect_plus_one(JournalFile *f,
/* This bisects the array in object 'first', but first checks /* This bisects the array in object 'first', but first checks
* an extra */ * an extra */
r = test_object(f, extra, needle); r = test_object(f, extra, needle);
if (r < 0) if (r < 0)
return r; return r;
@ -1234,6 +1233,11 @@ static int generic_array_bisect_plus_one(JournalFile *f,
if (offset) if (offset)
*offset = extra; *offset = extra;
if (idx)
*idx = 0;
return 1;
} else if (r == TEST_RIGHT) } else if (r == TEST_RIGHT)
return 0; return 0;