summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-04-09 17:16:55 +0200
committerantirez <antirez@gmail.com>2018-04-09 17:16:55 +0200
commit9a0dbbb594f74e27c9d8f550c494501b0196aed6 (patch)
treec9ac25a900944bdcd48fdc7f5df750790e2c9175
parenteaafea482870c839adc60d8453cbc0c1efb062c5 (diff)
downloadredis-9a0dbbb594f74e27c9d8f550c494501b0196aed6.tar.gz
Modules: remove trailing empty spaces.
-rw-r--r--src/module.c38
-rw-r--r--src/redismodule.h4
2 files changed, 21 insertions, 21 deletions
diff --git a/src/module.c b/src/module.c
index 3a494a203..c0c1401f4 100644
--- a/src/module.c
+++ b/src/module.c
@@ -1301,51 +1301,51 @@ int RM_GetSelectedDb(RedisModuleCtx *ctx) {
}
-/* Return the current context's flags. The flags provide information on the
+/* Return the current context's flags. The flags provide information on the
* current request context (whether the client is a Lua script or in a MULTI),
- * and about the Redis instance in general, i.e replication and persistence.
- *
+ * and about the Redis instance in general, i.e replication and persistence.
+ *
* The available flags are:
- *
+ *
* * REDISMODULE_CTX_FLAGS_LUA: The command is running in a Lua script
- *
+ *
* * REDISMODULE_CTX_FLAGS_MULTI: The command is running inside a transaction
- *
+ *
* * REDISMODULE_CTX_FLAGS_MASTER: The Redis instance is a master
- *
+ *
* * REDISMODULE_CTX_FLAGS_SLAVE: The Redis instance is a slave
- *
+ *
* * REDISMODULE_CTX_FLAGS_READONLY: The Redis instance is read-only
- *
+ *
* * REDISMODULE_CTX_FLAGS_CLUSTER: The Redis instance is in cluster mode
- *
+ *
* * REDISMODULE_CTX_FLAGS_AOF: The Redis instance has AOF enabled
- *
+ *
* * REDISMODULE_CTX_FLAGS_RDB: The instance has RDB enabled
- *
+ *
* * REDISMODULE_CTX_FLAGS_MAXMEMORY: The instance has Maxmemory set
- *
+ *
* * REDISMODULE_CTX_FLAGS_EVICT: Maxmemory is set and has an eviction
* policy that may delete keys
*/
int RM_GetContextFlags(RedisModuleCtx *ctx) {
-
+
int flags = 0;
/* Client specific flags */
if (ctx->client) {
- if (ctx->client->flags & CLIENT_LUA)
+ if (ctx->client->flags & CLIENT_LUA)
flags |= REDISMODULE_CTX_FLAGS_LUA;
- if (ctx->client->flags & CLIENT_MULTI)
+ if (ctx->client->flags & CLIENT_MULTI)
flags |= REDISMODULE_CTX_FLAGS_MULTI;
}
if (server.cluster_enabled)
flags |= REDISMODULE_CTX_FLAGS_CLUSTER;
-
+
/* Maxmemory and eviction policy */
if (server.maxmemory > 0) {
flags |= REDISMODULE_CTX_FLAGS_MAXMEMORY;
-
+
if (server.maxmemory_policy != MAXMEMORY_NO_EVICTION)
flags |= REDISMODULE_CTX_FLAGS_EVICT;
}
@@ -1364,7 +1364,7 @@ int RM_GetContextFlags(RedisModuleCtx *ctx) {
if (server.repl_slave_ro)
flags |= REDISMODULE_CTX_FLAGS_READONLY;
}
-
+
return flags;
}
diff --git a/src/redismodule.h b/src/redismodule.h
index 51752d9ad..4611a77e4 100644
--- a/src/redismodule.h
+++ b/src/redismodule.h
@@ -79,7 +79,7 @@
/* The instance has Maxmemory set */
#define REDISMODULE_CTX_FLAGS_MAXMEMORY 0x0100
/* Maxmemory is set and has an eviction policy that may delete keys */
-#define REDISMODULE_CTX_FLAGS_EVICT 0x0200
+#define REDISMODULE_CTX_FLAGS_EVICT 0x0200
#define REDISMODULE_NOTIFY_GENERIC (1<<2) /* g */
@@ -90,7 +90,7 @@
#define REDISMODULE_NOTIFY_ZSET (1<<7) /* z */
#define REDISMODULE_NOTIFY_EXPIRED (1<<8) /* x */
#define REDISMODULE_NOTIFY_EVICTED (1<<9) /* e */
-#define REDISMODULE_NOTIFY_STREAM (1<<10) /* t */
+#define REDISMODULE_NOTIFY_STREAM (1<<10) /* t */
#define REDISMODULE_NOTIFY_ALL (REDISMODULE_NOTIFY_GENERIC | REDISMODULE_NOTIFY_STRING | REDISMODULE_NOTIFY_LIST | REDISMODULE_NOTIFY_SET | REDISMODULE_NOTIFY_HASH | REDISMODULE_NOTIFY_ZSET | REDISMODULE_NOTIFY_EXPIRED | REDISMODULE_NOTIFY_EVICTED | REDISMODULE_NOTIFY_STREAM) /* A */