projects
/
platform
/
upstream
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Imported Upstream version 2.16.3
[platform/upstream/git.git]
/
string-list.c
diff --git
a/string-list.c
b/string-list.c
index
806b4c8
..
a0cf0cf
100644
(file)
--- a/
string-list.c
+++ b/
string-list.c
@@
-16,7
+16,7
@@
static int get_entry_index(const struct string_list *list, const char *string,
compare_strings_fn cmp = list->cmp ? list->cmp : strcmp;
while (left + 1 < right) {
- int middle =
(left + righ
t) / 2;
+ int middle =
left + (right - lef
t) / 2;
int compare = cmp(string, list->items[middle].string);
if (compare < 0)
right = middle;