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.
This commit is contained in:
parent
8dc28b6c75
commit
ca8d6f1072
@ -510,9 +510,6 @@ void lcsCommand(client *c) {
|
|||||||
if (a != NULL) {
|
if (a != NULL) {
|
||||||
addReplyError(c,"Either use STRINGS or KEYS");
|
addReplyError(c,"Either use STRINGS or KEYS");
|
||||||
return;
|
return;
|
||||||
} else if (moreargs != 2) {
|
|
||||||
addReplyError(c,"LCS requires exactly two strings");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
a = c->argv[j+1]->ptr;
|
a = c->argv[j+1]->ptr;
|
||||||
b = c->argv[j+2]->ptr;
|
b = c->argv[j+2]->ptr;
|
||||||
@ -521,9 +518,6 @@ void lcsCommand(client *c) {
|
|||||||
if (a != NULL) {
|
if (a != NULL) {
|
||||||
addReplyError(c,"Either use STRINGS or KEYS");
|
addReplyError(c,"Either use STRINGS or KEYS");
|
||||||
return;
|
return;
|
||||||
} else if (moreargs != 2) {
|
|
||||||
addReplyError(c,"LCS requires exactly two keys");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
obja = lookupKeyRead(c->db,c->argv[j+1]);
|
obja = lookupKeyRead(c->db,c->argv[j+1]);
|
||||||
objb = lookupKeyRead(c->db,c->argv[j+2]);
|
objb = lookupKeyRead(c->db,c->argv[j+2]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user