summaryrefslogtreecommitdiff
path: root/src/evict.c
diff options
context:
space:
mode:
authorhuijing.whj <huijing.whj@alibaba-inc.com>2018-01-10 23:47:02 +0800
committerhuijing.whj <huijing.whj@alibaba-inc.com>2018-01-10 23:47:02 +0800
commitf0e09bf8030680ad22682f2040f03b14ffd592a5 (patch)
treec7763ae4ed2cba393ea5b913683241158c569643 /src/evict.c
parente954742fbd0179176baa76e92c358fb235af6c11 (diff)
downloadredis-f0e09bf8030680ad22682f2040f03b14ffd592a5.tar.gz
fix int overflow problem in freeMemoryIfNeeded
Diffstat (limited to 'src/evict.c')
-rw-r--r--src/evict.c2
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;