Commit 78782ed5 authored by Matt Stancliff's avatar Matt Stancliff
Browse files

Use LRU_CLOCK() instead of function getLRUClock()

lookupKey() uses LRU_CLOCK(), so it seems object
creation should use LRU_CLOCK() too.
parent 7f1c3607
...@@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) { ...@@ -40,7 +40,7 @@ robj *createObject(int type, void *ptr) {
o->refcount = 1; o->refcount = 1;
/* Set the LRU to the current lruclock (minutes resolution). */ /* Set the LRU to the current lruclock (minutes resolution). */
o->lru = getLRUClock(); o->lru = LRU_CLOCK();
return o; return o;
} }
...@@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) { ...@@ -61,7 +61,7 @@ robj *createEmbeddedStringObject(char *ptr, size_t len) {
o->encoding = REDIS_ENCODING_EMBSTR; o->encoding = REDIS_ENCODING_EMBSTR;
o->ptr = sh+1; o->ptr = sh+1;
o->refcount = 1; o->refcount = 1;
o->lru = getLRUClock(); o->lru = LRU_CLOCK();
sh->len = len; sh->len = len;
sh->free = 0; sh->free = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment