Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
25029568
Commit
25029568
authored
Jan 23, 2019
by
Guy Benoish
Browse files
ZPOP should return an empty array if COUNT=0
parent
b270322f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
25029568
...
@@ -3140,7 +3140,10 @@ void genericZpopCommand(client *c, robj **keyv, int keyc, int where, int emitkey
...
@@ -3140,7 +3140,10 @@ void genericZpopCommand(client *c, robj **keyv, int keyc, int where, int emitkey
if (countarg) {
if (countarg) {
if (getLongFromObjectOrReply(c,countarg,&count,NULL) != C_OK)
if (getLongFromObjectOrReply(c,countarg,&count,NULL) != C_OK)
return;
return;
if
(
count
<
0
)
count
=
1
;
if (count <= 0) {
addReplyNullArray(c);
return;
}
}
}
/* Check type and break on the first error, otherwise identify candidate. */
/* Check type and break on the first error, otherwise identify candidate. */
...
...
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