You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2023/09/04 15:19:05 UTC

[GitHub] [kvrocks] git-hulk commented on a diff in pull request #1737: Add the support of LMPOP command

git-hulk commented on code in PR #1737:
URL: https://github.com/apache/kvrocks/pull/1737#discussion_r1315056969


##########
src/commands/cmd_list.cc:
##########
@@ -167,11 +167,11 @@ class CommandLMPop : public Commander {
     }
     num_keys_ = *v;
 
-    if ((args.size() != 3 + num_keys_) && (args.size() != 5 + num_keys_)) {
+    if ((args.size() != num_keys_ + 3) && (args.size() != num_keys_ + 5)) {
       return {Status::RedisParseErr, errWrongNumOfArguments};
     }
 
-    std::string left_or_right = util::ToLower(args[1 + num_keys_]);
+    std::string left_or_right = util::ToLower(args[num_keys_ + 2]);

Review Comment:
   @HolyLow Can use the CommandParser to parse arguments.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org