summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-12-06 12:05:11 +0100
committerantirez <antirez@gmail.com>2017-12-06 12:05:14 +0100
commit522760fac79536eb68dc5fc70e9166f689eb76dc (patch)
tree6c52ec43016f715418f4b5a03d05034bc720d955 /src/config.c
parent482d678e95c4d7e5754691799b04a2ae433a9479 (diff)
downloadredis-522760fac79536eb68dc5fc70e9166f689eb76dc.tar.gz
Change indentation and other minor details of PR #4489.
The main change introduced by this commit is pretending that help arrays are more text than code, thus indenting them at level 0. This improves readability, and is an old practice when defining arrays of C strings describing text. Additionally a few useless return statements are removed, and the HELP subcommand capitalized when printed to the user.
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/config.c b/src/config.c
index 0324c4b7c..24a590caf 100644
--- a/src/config.c
+++ b/src/config.c
@@ -2071,11 +2071,11 @@ void configCommand(client *c) {
if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
const char *help[] = {
- "get <pattern> -- Return parameters matching the glob-like <pattern> and their values.",
- "set <parameter> <value> -- Set parameter to value.",
- "resetstat -- Reset statistics reported by INFO.",
- "rewrite -- Rewrite the configuration file.",
- NULL
+"get <pattern> -- Return parameters matching the glob-like <pattern> and their values.",
+"set <parameter> <value> -- Set parameter to value.",
+"resetstat -- Reset statistics reported by INFO.",
+"rewrite -- Rewrite the configuration file.",
+NULL
};
addReplyHelp(c, help);
} else if (!strcasecmp(c->argv[1]->ptr,"set") && c->argc == 4) {
@@ -2099,7 +2099,7 @@ void configCommand(client *c) {
addReply(c,shared.ok);
}
} else {
- addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try SLOWLOG help",
+ addReplyErrorFormat(c, "Unknown subcommand or wrong number of arguments for '%s'. Try CONFIG HELP",
(char*)c->argv[1]->ptr);
return;
}