From c89e1f29373806b2d181edab81efcfb9cfc0403e Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 6 Apr 2020 13:48:31 +0200 Subject: [PATCH] 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. --- src/t_string.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/t_string.c b/src/t_string.c index 39eb055fb..335bda404 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]);