diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2020-02-27 17:58:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 17:58:49 +0100 |
commit | 7e64aa80d8c222064e916b0cbda2d67dfabaddb7 (patch) | |
tree | 593407e79ca0d2a544701f4d073ed9a9689a9328 | |
parent | 9abdc089f84c7b7e16b62b41a7a30eb9814d5b83 (diff) | |
parent | 337dcde9fafa6c4bab78f1ec74f8e8abf253c86c (diff) | |
download | redis-7e64aa80d8c222064e916b0cbda2d67dfabaddb7.tar.gz |
Merge pull request #6690 from yangbodong22011/fix-spop-return-nil
Fix spop return nil #4709
-rw-r--r-- | src/t_set.c | 2 |
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 |