mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
SCAN: stay inside 80 cols.
This commit is contained in:
parent
df13adb037
commit
48ea8a0a11
7
src/db.c
7
src/db.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) {
|
|||||||
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 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user