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
48ea8a0a
Commit
48ea8a0a
authored
Oct 25, 2013
by
antirez
Browse files
SCAN: stay inside 80 cols.
parent
df13adb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
48ea8a0a
...
...
@@ -348,7 +348,9 @@ void scanCommand(redisClient *c) {
while
(
i
<
c
->
argc
)
{
j
=
c
->
argc
-
i
;
if
(
!
strcasecmp
(
c
->
argv
[
i
]
->
ptr
,
"count"
)
&&
j
>=
2
)
{
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
i
+
1
],
&
count
,
NULL
)
!=
REDIS_OK
)
{
if
(
getLongFromObjectOrReply
(
c
,
c
->
argv
[
i
+
1
],
&
count
,
NULL
)
!=
REDIS_OK
)
{
goto
cleanup
;
}
...
...
@@ -383,7 +385,8 @@ void scanCommand(redisClient *c) {
nextnode
=
listNextNode
(
node
);
/* Keep key iff pattern matches and it hasn't expired */
if
((
patnoop
||
stringmatchlen
(
pat
,
patlen
,
kobj
->
ptr
,
sdslen
(
kobj
->
ptr
),
0
))
&&
if
((
patnoop
||
stringmatchlen
(
pat
,
patlen
,
kobj
->
ptr
,
sdslen
(
kobj
->
ptr
),
0
))
&&
(
expireIfNeeded
(
c
->
db
,
kobj
)
==
0
))
{
/* Keep */
...
...
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