summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-04-06 13:48:31 +0200
committerantirez <antirez@gmail.com>2020-04-06 13:48:31 +0200
commitca8d6f1072e15fcb12827c1ca84b388c41e394b3 (patch)
tree391cddee9d84744c5d4fe1e87d2deaaebb38c371
parent8dc28b6c7525190f3205969427614d51d47ac451 (diff)
downloadredis-ca8d6f1072e15fcb12827c1ca84b388c41e394b3.tar.gz
LCS: allow KEYS / STRINGS to be anywhere.
Initially they needed to be at the end so that we could extend to N strings in the future, but after further consideration I no longer believe it's worth it.
-rw-r--r--src/t_string.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/t_string.c b/src/t_string.c
index deba22253..4e693cefa 100644
--- a/src/t_string.c
+++ b/src/t_string.c
@@ -510,9 +510,6 @@ void lcsCommand(client *c) {
if (a != NULL) {
addReplyError(c,"Either use STRINGS or KEYS");
return;
- } else if (moreargs != 2) {
- addReplyError(c,"LCS requires exactly two strings");
- return;
}
a = c->argv[j+1]->ptr;
b = c->argv[j+2]->ptr;
@@ -521,9 +518,6 @@ void lcsCommand(client *c) {
if (a != NULL) {
addReplyError(c,"Either use STRINGS or KEYS");
return;
- } else if (moreargs != 2) {
- addReplyError(c,"LCS requires exactly two keys");
- return;
}
obja = lookupKeyRead(c->db,c->argv[j+1]);
objb = lookupKeyRead(c->db,c->argv[j+2]);