fix: use uint32_t instead of int to avoid negative hash result

This commit is contained in:
Minglei Jin 2022-07-08 18:56:48 +08:00
parent 478509421a
commit 5ae5ad14c4
1 changed files with 2 additions and 2 deletions

View File

@ -258,8 +258,8 @@ static void tdbPCacheUnpinPage(SPCache *pCache, SPage *pPage) {
}
static void tdbPCacheRemovePageFromHash(SPCache *pCache, SPage *pPage) {
SPage **ppPage;
int h;
SPage **ppPage;
uint32_t h;
h = tdbPCachePageHash(&(pPage->pgid));
for (ppPage = &(pCache->pgHash[h % pCache->nHash]); (*ppPage) && *ppPage != pPage; ppPage = &((*ppPage)->pHashNext))