*
* Copyright (C) 2008 Linus Torvalds
*/
-#define NO_THE_INDEX_COMPATIBILITY_MACROS
#include "cache.h"
#include "thread-utils.h"
else {
int begin = k_start;
int end = k_end;
+ assert(begin >= 0);
while (begin < end) {
- int mid = (begin + end) >> 1;
+ int mid = begin + ((end - begin) >> 1);
int cmp = strncmp(istate->cache[mid]->name, prefix->buf, prefix->len);
if (cmp == 0) /* mid has same prefix; look in second part */
begin = mid + 1;