Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7e64aa80
Unverified
Commit
7e64aa80
authored
Feb 27, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Feb 27, 2020
Browse files
Merge pull request #6690 from yangbodong22011/fix-spop-return-nil
Fix spop return nil #4709
parents
9abdc089
337dcde9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_set.c
View file @
7e64aa80
...
@@ -415,7 +415,7 @@ void spopWithCountCommand(client *c) {
...
@@ -415,7 +415,7 @@ void spopWithCountCommand(client *c) {
/* Make sure a key with the name inputted exists, and that it's type is
/* Make sure a key with the name inputted exists, and that it's type is
* indeed a set. Otherwise, return nil */
* 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
;
==
NULL
||
checkType
(
c
,
set
,
OBJ_SET
))
return
;
/* If count is zero, serve an empty set ASAP to avoid special
/* If count is zero, serve an empty set ASAP to avoid special
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment