summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2022-04-25 22:59:39 +0800
committerGitHub <noreply@github.com>2022-04-25 17:59:39 +0300
commit119ec91a5aa9b655d700d911eae68e8a5fa694d4 (patch)
tree4a781ccb3f29a0d232e650094b48fc6752bffffb /src
parent0c35f54f0a12b3dada3e7156f6595af4a089e24e (diff)
downloadredis-119ec91a5aa9b655d700d911eae68e8a5fa694d4.tar.gz
Fix typos and limit unknown command error message (#10634)
minor cleanup for recent changes.
Diffstat (limited to 'src')
-rw-r--r--src/bitops.c2
-rw-r--r--src/module.c4
-rw-r--r--src/networking.c2
-rw-r--r--src/server.c6
-rw-r--r--src/server.h2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/bitops.c b/src/bitops.c
index ddc9095bc..e35001937 100644
--- a/src/bitops.c
+++ b/src/bitops.c
@@ -1002,7 +1002,7 @@ void bitposCommand(client *c) {
}
}
-/* BITFIELD key subcommmand-1 arg ... subcommand-2 arg ... subcommand-N ...
+/* BITFIELD key subcommand-1 arg ... subcommand-2 arg ... subcommand-N ...
*
* Supported subcommands:
*
diff --git a/src/module.c b/src/module.c
index d55fe3cfe..a1e104c0d 100644
--- a/src/module.c
+++ b/src/module.c
@@ -1049,9 +1049,9 @@ RedisModuleCommand *moduleCreateCommandProxy(struct RedisModule *module, sds dec
* serve stale data. Don't use if you don't know what
* this means.
* * **"no-monitor"**: Don't propagate the command on monitor. Use this if
- * the command has sensible data among the arguments.
+ * the command has sensitive data among the arguments.
* * **"no-slowlog"**: Don't log this command in the slowlog. Use this if
- * the command has sensible data among the arguments.
+ * the command has sensitive data among the arguments.
* * **"fast"**: The command time complexity is not greater
* than O(log(N)) where N is the size of the collection or
* anything else representing the normal scalability
diff --git a/src/networking.c b/src/networking.c
index 4e18d26de..d9d300ac2 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -3812,7 +3812,7 @@ void flushSlavesOutputBuffers(void) {
}
}
-/* Compute current most restictive pause type and its end time, aggregated for
+/* Compute current most restrictive pause type and its end time, aggregated for
* all pause purposes. */
static void updateClientPauseTypeAndEndTime(void) {
pause_type old_type = server.client_pause_type;
diff --git a/src/server.c b/src/server.c
index 50fa487d2..b3106d0f7 100644
--- a/src/server.c
+++ b/src/server.c
@@ -3494,7 +3494,7 @@ void populateCommandMovableKeys(struct redisCommand *cmd) {
cmd->flags |= CMD_MOVABLE_KEYS;
}
-/* Check if c->cmd exists, fills `err` with deatils in case it doesn't
+/* Check if c->cmd exists, fills `err` with details in case it doesn't.
* Return 1 if exists. */
int commandCheckExistence(client *c, sds *err) {
if (c->cmd)
@@ -3516,14 +3516,14 @@ int commandCheckExistence(client *c, sds *err) {
for (i=1; i < c->argc && sdslen(args) < 128; i++)
args = sdscatprintf(args, "'%.*s' ", 128-(int)sdslen(args), (char*)c->argv[i]->ptr);
*err = sdsnew(NULL);
- *err = sdscatprintf(*err, "unknown command '%s', with args beginning with: %s",
+ *err = sdscatprintf(*err, "unknown command '%.128s', with args beginning with: %s",
(char*)c->argv[0]->ptr, args);
sdsfree(args);
}
return 0;
}
-/* Check if c->argc is valid for c->cmd, fills `err` with deatils in case it isn't
+/* Check if c->argc is valid for c->cmd, fills `err` with details in case it isn't.
* Return 1 if valid. */
int commandCheckArity(client *c, sds *err) {
if ((c->cmd->arity > 0 && c->cmd->arity != c->argc) ||
diff --git a/src/server.h b/src/server.h
index 0591395a9..da4a1ebcd 100644
--- a/src/server.h
+++ b/src/server.h
@@ -1062,7 +1062,7 @@ typedef struct replBacklog {
listNode *ref_repl_buf_node; /* Referenced node of replication buffer blocks,
* see the definition of replBufBlock. */
size_t unindexed_count; /* The count from last creating index block. */
- rax *blocks_index; /* The index of reocrded blocks of replication
+ rax *blocks_index; /* The index of recorded blocks of replication
* buffer for quickly searching replication
* offset on partial resynchronization. */
long long histlen; /* Backlog actual data length */