sd-journal: drop duplicated tests in generic_array_bisect()

When left == right (== 0), generic_array_bisec_step() does not update
left and right. So the following test is exactly the same.
This commit is contained in:
Yu Watanabe
2024-02-10 00:26:17 +09:00
parent c078f4af6b
commit 821d55a8d7
+1 -1
View File
@@ -3047,7 +3047,7 @@ static int generic_array_bisect(
left = 0;
right = m - 1;
if (direction == DIRECTION_UP) {
if (direction == DIRECTION_UP && left < right) {
/* If we're going upwards, the last entry of the previous array may pass the test,
* and the first entry of the current array may not pass. In that case, the last
* entry of the previous array must be returned. Hence, we need to test the first