Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
q3356564 committed May 31, 2024
1 parent 29cda5d commit 38521ca
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/commands/cmd_json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

if (!s.ok()) return {Status::RedisExecErr, s.ToString()};

*output = SizeToString(results);
Expand Down

0 comments on commit 38521ca

Please sign in to comment.