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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user