Commit 5ba79bda authored by antirez's avatar antirez
Browse files

Document mostly dead code in RPOPLPUSH implementation.

parent 79daddd5
...@@ -699,6 +699,8 @@ void rpoplpushCommand(redisClient *c) { ...@@ -699,6 +699,8 @@ void rpoplpushCommand(redisClient *c) {
checkType(c,sobj,REDIS_LIST)) return; checkType(c,sobj,REDIS_LIST)) return;
if (listTypeLength(sobj) == 0) { if (listTypeLength(sobj) == 0) {
/* This may only happen after loading very old RDB files. Recent
* versions of Redis delete keys of empty lists. */
addReply(c,shared.nullbulk); addReply(c,shared.nullbulk);
} else { } else {
robj *dobj = lookupKeyWrite(c->db,c->argv[2]); robj *dobj = lookupKeyWrite(c->db,c->argv[2]);
......
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