diff --git a/src/evict.c b/src/evict.c index 059e82fe3..fe19ca177 100644 --- a/src/evict.c +++ b/src/evict.c @@ -162,7 +162,7 @@ int evictionPoolPopulate(redisDb *db, kvstore *samplekvs, struct evictionPoolEnt idle = 255-LFUDecrAndReturn(o); } else if (server.maxmemory_policy == MAXMEMORY_VOLATILE_TTL) { /* In this case the sooner the expire the better. */ - idle = ULLONG_MAX - (long)dictGetVal(de); + idle = ULLONG_MAX - dictGetSignedIntegerVal(de); } else { serverPanic("Unknown eviction policy in evictionPoolPopulate()"); }