diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-08-19 15:16:32 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-08-19 15:16:32 +0200 |
commit | a2e99cdf94a8a0350ff13b241de07f34c015b1fc (patch) | |
tree | ce04dee891b43cd3c3827dd3ccc3f4cc4ba283ce /src/journal/journal-verify.c | |
parent | fc89a13992384ab8d8fb0c937b021434123bbc49 (diff) |
journal: fix bisection algorithm
Diffstat (limited to 'src/journal/journal-verify.c')
-rw-r--r-- | src/journal/journal-verify.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c index 535b2727ac..e3c3ccdb20 100644 --- a/src/journal/journal-verify.c +++ b/src/journal/journal-verify.c @@ -266,10 +266,14 @@ static int contains_uint64(MMapCache *m, int fd, uint64_t n, uint64_t p) { if (*z == p) return 1; + if (a + 1 >= b) + return 0; + if (p < *z) b = c; - else + else { a = c; + } } return 0; |