Updated a few more hash functions to be able to deal with negative numbers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14067 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+2
-2
@@ -74,7 +74,7 @@ transaction_hash(void *_transaction, const void *_id, uint32 range)
|
||||
if (transaction != NULL)
|
||||
return transaction->id % range;
|
||||
|
||||
return *id % range;
|
||||
return (uint32)*id % range;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ cached_block::Hash(void *_cacheEntry, const void *_block, uint32 range)
|
||||
if (cacheEntry != NULL)
|
||||
return cacheEntry->block_number % range;
|
||||
|
||||
return *block % range;
|
||||
return (uint64)*block % range;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user