]> err.no Git - systemd/commitdiff
journal: properly handle first inline bisect array entry
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Dec 2011 21:32:52 +0000 (22:32 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Dec 2011 21:32:52 +0000 (22:32 +0100)
src/journal/journal-file.c

index a0c479fc676983a5989664a7844e41802d4ee7a8..4a006d3bf3510b282b87678bf0cfa93e3bc5aeed 100644 (file)
@@ -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;