Check if offset is set is no longer necessary in the loop as it is done before.
Also, check after checing index <= max.
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
goto max;
index = mas->index;
+ max = pivots[offset];
+ if (index <= max)
+ goto done;
+ if (unlikely(!max && offset))
+ goto max;
+ offset++;
+ min = max + 1;
while (offset < count) {
max = pivots[offset];
- if (unlikely(!max && offset))
- break;
-
if (index <= max)
goto done;
+ if (unlikely(!max))
+ break;
+
min = max + 1;
offset++;
}