Skip to content

Commit

Permalink
fix clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
empiredan committed Dec 30, 2024
1 parent 98b60d4 commit cb49b32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/meta/meta_http_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,9 @@ void meta_http_service::list_node_handler(const http_request &req, http_response
for (const auto &node : _service->_dead_set) {
tmp_map.emplace(node, list_nodes_helper(node.to_string(), "UNALIVE"));
}
int alive_node_count = (_service->_alive_set).size();
int unalive_node_count = (_service->_dead_set).size();

size_t alive_node_count = (_service->_alive_set).size();
size_t unalive_node_count = (_service->_dead_set).size();

if (detailed) {
INIT_AND_CALL_LIST_APPS(app_status::AS_AVAILABLE, list_apps_req, list_apps_resp, resp);
Expand Down Expand Up @@ -527,7 +528,7 @@ void meta_http_service::get_app_envs_handler(const http_request &req, http_respo
dsn::utils::table_printer tp;
for (auto &app : list_apps_resp.infos) {
if (app.app_name == app_name) {
for (auto env : app.envs) {
for (const auto &env : app.envs) {
tp.add_row_name_and_data(env.first, env.second);
}
break;
Expand Down
6 changes: 4 additions & 2 deletions src/shell/commands/node_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,12 @@ bool ls_nodes(command_executor *, shell_context *sc, arguments args)
dsn::utils::multi_table_printer multi_printer;
if (!(status.empty() && output_file.empty())) {
dsn::utils::table_printer tp("parameters");
if (!status.empty())
if (!status.empty()) {
tp.add_row_name_and_data("status", status);
if (!output_file.empty())
}
if (!output_file.empty()) {
tp.add_row_name_and_data("out_file", output_file);
}
multi_printer.add(std::move(tp));
}

Expand Down

0 comments on commit cb49b32

Please sign in to comment.