summaryrefslogtreecommitdiff
path: root/src/t_list.c
diff options
context:
space:
mode:
authorWen Hui <wen.hui.ware@gmail.com>2022-05-13 10:55:49 -0400
committerGitHub <noreply@github.com>2022-05-13 17:55:49 +0300
commit135998ed8d0fc92d7ee6e23b1a66353f5900695f (patch)
treebe9ccdbb1a7bb66ce83dd667efb6dbc63c57e718 /src/t_list.c
parent586a16ad7907d9742a63cfcec464be7ac54aa495 (diff)
downloadredis-135998ed8d0fc92d7ee6e23b1a66353f5900695f.tar.gz
Update comments on command args, and a misleading error reply (#10645)
Updated the comments for: info command lmpopCommand and blmpopCommand sinterGenericCommand Fix the missing "key" words in the srandmemberCommand function For LPOS command, when rank is 0, prompt user that rank could be positive number or negative number, and add a test for it
Diffstat (limited to 'src/t_list.c')
-rw-r--r--src/t_list.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/t_list.c b/src/t_list.c
index 1cd3fb1a5..705da219c 100644
--- a/src/t_list.c
+++ b/src/t_list.c
@@ -679,7 +679,8 @@ void lposCommand(client *c) {
return;
if (rank == 0) {
addReplyError(c,"RANK can't be zero: use 1 to start from "
- "the first match, 2 from the second, ...");
+ "the first match, 2 from the second ... "
+ "or use negative to start from the end of the list");
return;
}
} else if (!strcasecmp(opt,"COUNT") && moreargs) {
@@ -1197,12 +1198,12 @@ void lmpopGenericCommand(client *c, int numkeys_idx, int is_block) {
}
}
-/* LMPOP numkeys [<key> ...] LEFT|RIGHT [COUNT count] */
+/* LMPOP numkeys <key> [<key> ...] (LEFT|RIGHT) [COUNT count] */
void lmpopCommand(client *c) {
lmpopGenericCommand(c, 1, 0);
}
-/* BLMPOP timeout numkeys [<key> ...] LEFT|RIGHT [COUNT count] */
+/* BLMPOP timeout numkeys <key> [<key> ...] (LEFT|RIGHT) [COUNT count] */
void blmpopCommand(client *c) {
lmpopGenericCommand(c, 2, 1);
}