diff options
author | huijing.whj <huijing.whj@alibaba-inc.com> | 2018-01-10 23:47:02 +0800 |
---|---|---|
committer | huijing.whj <huijing.whj@alibaba-inc.com> | 2018-01-10 23:47:02 +0800 |
commit | f0e09bf8030680ad22682f2040f03b14ffd592a5 (patch) | |
tree | c7763ae4ed2cba393ea5b913683241158c569643 | |
parent | e954742fbd0179176baa76e92c358fb235af6c11 (diff) | |
download | redis-f0e09bf8030680ad22682f2040f03b14ffd592a5.tar.gz |
fix int overflow problem in freeMemoryIfNeeded
-rw-r--r-- | src/evict.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evict.c b/src/evict.c index bf485ddc5..eacdf12ac 100644 --- a/src/evict.c +++ b/src/evict.c @@ -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; |