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


##########
src/commands/cmd_json.cc:
##########
@@ -652,14 +652,15 @@ class CommandJsonDebug : public Commander {
     std::vector<std::size_t> results;
     auto s = json.DebugMemory(args_[2], path, &results);
 
-    if (s.IsNotFound() && args_.size() == 3) {
-      *output = redis::Integer(0);
-      return Status::OK();
-    } else if (s.IsNotFound() && args_.size() == 4) {
-      *output = SizeToString(results);
-      return Status::OK();
+    if (s.IsNotFound()) {
+      if (args_.size() == 3) {
+        *output = redis::Integer(0);
+        return Status::OK();
+      } else {
+        *output = SizeToString(results);
+        return Status::OK();
+      }
     }

Review Comment:
   ```suggestion
       if (s.IsNotFound()) {
         if (args_.size() == 3) {
           *output = redis::Integer(0);
         } else {
           *output = SizeToString(results);
         }
         return Status::OK();
       }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to