summaryrefslogtreecommitdiff
path: root/src/keysym-utf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keysym-utf.c')
-rw-r--r--src/keysym-utf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keysym-utf.c b/src/keysym-utf.c
index 129da15..9b6fbd7 100644
--- a/src/keysym-utf.c
+++ b/src/keysym-utf.c
@@ -838,15 +838,15 @@ static const struct codepair keysymtab[] = {
static uint32_t
bin_search(const struct codepair *table, size_t length, xkb_keysym_t keysym)
{
- int first = 0;
- int last = length;
+ size_t first = 0;
+ size_t last = length;
if (keysym < table[0].keysym || keysym > table[length].keysym)
return 0;
/* binary search in table */
while (last >= first) {
- int mid = (first + last) / 2;
+ size_t mid = (first + last) / 2;
if (table[mid].keysym < keysym)
first = mid + 1;
else if (table[mid].keysym > keysym)