summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-07-21 11:14:15 +0200
committerantirez <antirez@gmail.com>2016-07-21 11:14:18 +0200
commite0582b35984f8bc215f4a31860bcee5679f75330 (patch)
tree0e72e28ebfd30db94ecd1e354f74cac5ca1f9547
parent2d5eb1f1a03b9109137e2fbfe8df488a09e4cd6c (diff)
downloadredis-e0582b35984f8bc215f4a31860bcee5679f75330.tar.gz
Fix maxmemory shared integer check bug introduced with LFU.
-rw-r--r--src/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object.c b/src/object.c
index c64d810b0..a7c1e4c21 100644
--- a/src/object.c
+++ b/src/object.c
@@ -403,7 +403,7 @@ robj *tryObjectEncoding(robj *o) {
* because every object needs to have a private LRU field for the LRU
* algorithm to work well. */
if ((server.maxmemory == 0 ||
- !(server.maxmemory & MAXMEMORY_FLAG_NO_SHARED_INTEGERS)) &&
+ !(server.maxmemory_policy & MAXMEMORY_FLAG_NO_SHARED_INTEGERS)) &&
value >= 0 &&
value < OBJ_SHARED_INTEGERS)
{