Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiaoshuai123 committed Apr 19, 2024
1 parent 35b4cc6 commit 9dc71e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/cmd_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ void CmdConfigSet::DoCmd(PClient* client) {
auto s = g_config.Set(client->argv_[2], client->argv_[3]);
if (!s.ok()) {
client->SetRes(CmdRes::kInvalidParameter);
// client->AppendString(s.ToString());
} else {
client->SetRes(CmdRes::kOK);
}
Expand Down Expand Up @@ -99,7 +98,7 @@ ShutdownCmd::ShutdownCmd(const std::string& name, int16_t arity)
bool ShutdownCmd::DoInitial(PClient* client) {
// For now, only shutdown need check local
if (client->PeerIP().find("127.0.0.1") == std::string::npos &&
client->PeerIP().find(g_config.ip.ToString().c_str()) == std::string::npos) {
client->PeerIP().find(g_config.ip.ToString()) == std::string::npos) {
client->SetRes(CmdRes::kErrOther, kCmdNameShutdown + " should be localhost");
return false;
}
Expand Down
1 change: 0 additions & 1 deletion src/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <iostream>
#include <string>
#include <string_view>
#include <system_error>
#include <vector>

Expand Down

0 comments on commit 9dc71e1

Please sign in to comment.