mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 18:54:58 +00:00
fix boundary case for _dictNextPower
This commit is contained in:
parent
f31d9b12fd
commit
7675b00a64
@ -940,7 +940,7 @@ static unsigned long _dictNextPower(unsigned long size)
|
|||||||
{
|
{
|
||||||
unsigned long i = DICT_HT_INITIAL_SIZE;
|
unsigned long i = DICT_HT_INITIAL_SIZE;
|
||||||
|
|
||||||
if (size >= LONG_MAX) return LONG_MAX;
|
if (size >= LONG_MAX) return LONG_MAX + 1LU;
|
||||||
while(1) {
|
while(1) {
|
||||||
if (i >= size)
|
if (i >= size)
|
||||||
return i;
|
return i;
|
||||||
|
Loading…
Reference in New Issue
Block a user