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
4e7a160b
Commit
4e7a160b
authored
May 22, 2018
by
zhaozhao.zz
Browse files
ZPOP: fix the wrong keyc, should be 1
parent
3c968ff0
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
4e7a160b
...
@@ -3080,8 +3080,8 @@ void zscanCommand(client *c) {
...
@@ -3080,8 +3080,8 @@ void zscanCommand(client *c) {
* use the 'count' argument to return multiple items if available. */
* use the 'count' argument to return multiple items if available. */
void
genericZpopCommand
(
client
*
c
,
robj
**
keyv
,
int
keyc
,
int
where
,
int
emitkey
,
robj
*
countarg
)
{
void
genericZpopCommand
(
client
*
c
,
robj
**
keyv
,
int
keyc
,
int
where
,
int
emitkey
,
robj
*
countarg
)
{
int
idx
;
int
idx
;
robj
*
key
;
robj
*
key
=
NULL
;
robj
*
zobj
;
robj
*
zobj
=
NULL
;
sds
ele
;
sds
ele
;
double
score
;
double
score
;
long
count
=
1
;
long
count
=
1
;
...
@@ -3185,7 +3185,7 @@ void zpopminCommand(client *c) {
...
@@ -3185,7 +3185,7 @@ void zpopminCommand(client *c) {
addReply
(
c
,
shared
.
syntaxerr
);
addReply
(
c
,
shared
.
syntaxerr
);
return
;
return
;
}
}
genericZpopCommand
(
c
,
&
c
->
argv
[
1
],
c
->
argc
-
1
,
ZSET_MIN
,
0
,
genericZpopCommand
(
c
,
&
c
->
argv
[
1
],
1
,
ZSET_MIN
,
0
,
c
->
argc
==
3
?
c
->
argv
[
2
]
:
NULL
);
c
->
argc
==
3
?
c
->
argv
[
2
]
:
NULL
);
}
}
...
@@ -3195,7 +3195,7 @@ void zpopmaxCommand(client *c) {
...
@@ -3195,7 +3195,7 @@ void zpopmaxCommand(client *c) {
addReply
(
c
,
shared
.
syntaxerr
);
addReply
(
c
,
shared
.
syntaxerr
);
return
;
return
;
}
}
genericZpopCommand
(
c
,
&
c
->
argv
[
1
],
c
->
argc
-
1
,
ZSET_MAX
,
0
,
genericZpopCommand
(
c
,
&
c
->
argv
[
1
],
1
,
ZSET_MAX
,
0
,
c
->
argc
==
3
?
c
->
argv
[
2
]
:
NULL
);
c
->
argc
==
3
?
c
->
argv
[
2
]
:
NULL
);
}
}
...
...
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