summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbodong.ybd <bodong.ybd@alibaba-inc.com>2019-12-21 21:27:38 +0800
committerbodong.ybd <bodong.ybd@alibaba-inc.com>2019-12-21 21:27:38 +0800
commit337dcde9fafa6c4bab78f1ec74f8e8abf253c86c (patch)
tree788e55632854c0bd2e1f42ed6da0752712632e26
parent324e22accf457edc996971bc97f5474349cd7c4c (diff)
downloadredis-337dcde9fafa6c4bab78f1ec74f8e8abf253c86c.tar.gz
Fix spop return nil #4709
-rw-r--r--src/t_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_set.c b/src/t_set.c
index abbf82fde..60cf22d8c 100644
--- a/src/t_set.c
+++ b/src/t_set.c
@@ -415,7 +415,7 @@ void spopWithCountCommand(client *c) {
/* Make sure a key with the name inputted exists, and that it's type is
* indeed a set. Otherwise, return nil */
- if ((set = lookupKeyWriteOrReply(c,c->argv[1],shared.null[c->resp]))
+ if ((set = lookupKeyWriteOrReply(c,c->argv[1],shared.emptyset[c->resp]))
== NULL || checkType(c,set,OBJ_SET)) return;
/* If count is zero, serve an empty set ASAP to avoid special