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
8c4ff679
Commit
8c4ff679
authored
Jul 10, 2012
by
Pieter Noordhuis
Committed by
antirez
Oct 29, 2013
Browse files
SCAN requires at least 1 argument
parent
0dd95e23
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
8c4ff679
...
@@ -327,6 +327,8 @@ void scanCommand(redisClient *c) {
...
@@ -327,6 +327,8 @@ void scanCommand(redisClient *c) {
sds
pat
;
sds
pat
;
int
patlen
,
patnoop
=
1
;
int
patlen
,
patnoop
=
1
;
redisAssert
(
c
->
argc
>=
2
);
/* Use sscanf because we need an *unsigned* long */
/* Use sscanf because we need an *unsigned* long */
rv
=
sscanf
(
c
->
argv
[
1
]
->
ptr
,
"%lu"
,
&
cursor
);
rv
=
sscanf
(
c
->
argv
[
1
]
->
ptr
,
"%lu"
,
&
cursor
);
if
(
rv
!=
1
)
{
if
(
rv
!=
1
)
{
...
...
src/redis.c
View file @
8c4ff679
...
@@ -207,7 +207,7 @@ struct redisCommand redisCommandTable[] = {
...
@@ -207,7 +207,7 @@ struct redisCommand redisCommandTable[] = {
{
"pexpire"
,
pexpireCommand
,
3
,
"w"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"pexpire"
,
pexpireCommand
,
3
,
"w"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"pexpireat"
,
pexpireatCommand
,
3
,
"w"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"pexpireat"
,
pexpireatCommand
,
3
,
"w"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"keys"
,
keysCommand
,
2
,
"rS"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"keys"
,
keysCommand
,
2
,
"rS"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"scan"
,
scanCommand
,
-
1
,
"RS"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"scan"
,
scanCommand
,
-
2
,
"RS"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"dbsize"
,
dbsizeCommand
,
1
,
"r"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"dbsize"
,
dbsizeCommand
,
1
,
"r"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"auth"
,
authCommand
,
2
,
"rslt"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"auth"
,
authCommand
,
2
,
"rslt"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"ping"
,
pingCommand
,
1
,
"rt"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"ping"
,
pingCommand
,
1
,
"rt"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
...
...
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