summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-19 15:16:32 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-19 15:16:32 +0200
commita2e99cdf94a8a0350ff13b241de07f34c015b1fc (patch)
treece04dee891b43cd3c3827dd3ccc3f4cc4ba283ce
parentfc89a13992384ab8d8fb0c937b021434123bbc49 (diff)
journal: fix bisection algorithm
-rw-r--r--src/journal/journal-verify.c6
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;