Fix rtree_subkey() regression.

Fix rtree_subkey() to use uintptr_t rather than unsigned for key
bitmasking.  This regression was introduced by
4a346f5593 (Replace rtree path cache with
LRU cache.).
This commit is contained in:
Jason Evans 2017-02-09 12:31:11 -08:00
parent 7f55dbef9b
commit 6b8ef771a9

View File

@ -40,7 +40,7 @@ rtree_subkey(uintptr_t key, unsigned level) {
unsigned cumbits = rtree_levels[level].cumbits;
unsigned shiftbits = ptrbits - cumbits;
unsigned maskbits = rtree_levels[level].bits;
unsigned mask = (ZU(1) << maskbits) - 1;
uintptr_t mask = (ZU(1) << maskbits) - 1;
return ((key >> shiftbits) & mask);
}