Commit 48ea8a0a authored by antirez's avatar antirez
Browse files

SCAN: stay inside 80 cols.

parent df13adb0
...@@ -348,7 +348,9 @@ void scanCommand(redisClient *c) { ...@@ -348,7 +348,9 @@ void scanCommand(redisClient *c) {
while (i < c->argc) { while (i < c->argc) {
j = c->argc - i; j = c->argc - i;
if (!strcasecmp(c->argv[i]->ptr, "count") && j >= 2) { 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; goto cleanup;
} }
...@@ -383,7 +385,8 @@ void scanCommand(redisClient *c) { ...@@ -383,7 +385,8 @@ void scanCommand(redisClient *c) {
nextnode = listNextNode(node); nextnode = listNextNode(node);
/* Keep key iff pattern matches and it hasn't expired */ /* 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)) (expireIfNeeded(c->db, kobj) == 0))
{ {
/* Keep */ /* Keep */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment