Merge pull request #14699 from taosdata/fix/tdb-hash-negative

fix: use uint32_t instead of int to avoid negative hash result
This commit is contained in:
Minglei Jin 2022-07-08 19:37:38 +08:00 committed by GitHub
commit 19922cacf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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