You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/19 17:03:34 UTC

[GitHub] [incubator-kvrocks] tanruixiang commented on a diff in pull request #897: Replace std::stol with ParseInt

tanruixiang commented on code in PR #897:
URL: https://github.com/apache/incubator-kvrocks/pull/897#discussion_r974482423


##########
src/redis_cmd.cc:
##########
@@ -889,12 +884,16 @@ class CommandBitCount : public Commander {
       return Status(Status::RedisParseErr, errInvalidSyntax);
     }
     if (args.size() == 4) {
-      try {
-        start_ = std::stol(args[2]);
-        stop_ = std::stol(args[3]);
-      } catch (std::exception &e) {
+      auto parseArgs2Result = ParseInt<int64_t>(args[2], /* base= */ 10);

Review Comment:
   > 
   
   Hi. This type is int64_t.



-- 
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