diff options
author | Ran Benita <ran234@gmail.com> | 2014-02-08 16:03:06 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2014-02-08 16:03:06 +0200 |
commit | a088c9ba772f829ff995a6d0767c1b6fcc879ec3 (patch) | |
tree | 9a4c2400cedf5df1a9308c035df5e9a86445fe79 /src/keysym-utf.c | |
parent | 04bacf87ba0f91a4d4445c55565373830cb7ec4a (diff) | |
download | xorg-lib-libxkbcommon-a088c9ba772f829ff995a6d0767c1b6fcc879ec3.tar.gz |
keysym: fix types in bin_search
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/keysym-utf.c')
-rw-r--r-- | src/keysym-utf.c | 6 |
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) |