summaryrefslogtreecommitdiff
path: root/src/evict.c
diff options
context:
space:
mode:
authorzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2017-10-13 11:09:48 +0800
committerantirez <antirez@gmail.com>2017-11-27 18:38:55 +0100
commit53cea97204ebc8d863ca99db4c9705ce0f87892f (patch)
tree82ae44234451872120d5a590c5faadf577e38d41 /src/evict.c
parentdfc42ec4471ea3f90c73c123b655e4a10c0e922e (diff)
downloadredis-53cea97204ebc8d863ca99db4c9705ce0f87892f.tar.gz
LFU: change lfu* parameters to int
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 5ce5ca07f..0a04ed1bb 100644
--- a/src/evict.c
+++ b/src/evict.c
@@ -334,7 +334,7 @@ uint8_t LFULogIncr(uint8_t counter) {
unsigned long LFUDecrAndReturn(robj *o) {
unsigned long ldt = o->lru >> 8;
unsigned long counter = o->lru & 255;
- if (LFUTimeElapsed(ldt) >= server.lfu_decay_time && counter) {
+ if (LFUTimeElapsed(ldt) >= (unsigned long)server.lfu_decay_time && counter) {
if (counter > LFU_INIT_VAL*2) {
counter /= 2;
if (counter < LFU_INIT_VAL*2) counter = LFU_INIT_VAL*2;