fix int overflow problem in freeMemoryIfNeeded

This commit is contained in:
huijing.whj 2018-01-10 23:47:02 +08:00 committed by antirez
parent 3150c67244
commit 4630da375c

View File

@ -404,7 +404,7 @@ int freeMemoryIfNeeded(void) {
latencyStartMonitor(latency);
while (mem_freed < mem_tofree) {
int j, k, i, keys_freed = 0;
static int next_db = 0;
static unsigned int next_db = 0;
sds bestkey = NULL;
int bestdbid;
redisDb *db;