aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@gmail.com>2018-07-18 09:55:50 -0700
committerGravatar GitHub <noreply@github.com>2018-07-18 09:55:50 -0700
commit6d091e5434a89a7a146d0a2cd0b114fcb3f742a2 (patch)
tree51ea9e1cb8010a2032a58d65cede3f45ce13e168 /src
parent125c9099d75fcacd8f8e8d9f7ee0bf0186a5abd5 (diff)
parentbc3723bc045a008d13cec3bc71a1af2c6c20ac2a (diff)
Merge pull request #16049 from ncteisen/clang-tidy
Cland Tidy Fixes for Channelz
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/client_channel/client_channel_channelz.cc4
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc4
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel_channelz.cc b/src/core/ext/filters/client_channel/client_channel_channelz.cc
index 235b8f3207..8cfc3f8a4c 100644
--- a/src/core/ext/filters/client_channel/client_channel_channelz.cc
+++ b/src/core/ext/filters/client_channel/client_channel_channelz.cc
@@ -69,7 +69,7 @@ void ClientChannelNode::PopulateChildRefs(grpc_json* json) {
grpc_json* json_iterator = nullptr;
grpc_client_channel_populate_child_refs(client_channel_, &child_subchannels,
&child_channels);
- if (child_subchannels.size() > 0) {
+ if (!child_subchannels.empty()) {
grpc_json* array_parent = grpc_json_create_child(
nullptr, json, "subchannelRef", nullptr, GRPC_JSON_ARRAY, false);
for (size_t i = 0; i < child_subchannels.size(); ++i) {
@@ -80,7 +80,7 @@ void ClientChannelNode::PopulateChildRefs(grpc_json* json) {
child_subchannels[i]);
}
}
- if (child_channels.size() > 0) {
+ if (!child_channels.empty()) {
grpc_json* array_parent = grpc_json_create_child(
nullptr, json, "channelRef", nullptr, GRPC_JSON_ARRAY, false);
json_iterator = nullptr;
diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
index c50deb9679..18e983d6f7 100644
--- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
@@ -59,7 +59,7 @@ class PickFirst : public LoadBalancingPolicy {
void PingOneLocked(grpc_closure* on_initiate, grpc_closure* on_ack) override;
void ExitIdleLocked() override;
void FillChildRefsForChannelz(ChildRefsList* child_subchannels,
- ChildRefsList* child_channels) override;
+ ChildRefsList* ignored) override;
private:
~PickFirst();
@@ -181,7 +181,7 @@ void PickFirst::HandOffPendingPicksLocked(LoadBalancingPolicy* new_policy) {
}
void PickFirst::ShutdownLocked() {
- AutoChildRefsUpdater(this);
+ AutoChildRefsUpdater gaurd(this);
grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel shutdown");
if (grpc_lb_pick_first_trace.enabled()) {
gpr_log(GPR_INFO, "Pick First %p Shutting down", this);
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc
index 9d608c3c55..93df2aff70 100644
--- a/src/core/ext/filters/client_channel/subchannel.cc
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -390,8 +390,8 @@ grpc_subchannel* grpc_subchannel_create(grpc_connector* connector,
}
grpc_core::channelz::SubchannelNode* grpc_subchannel_get_channelz_node(
- grpc_subchannel* s) {
- return s->channelz_subchannel.get();
+ grpc_subchannel* subchannel) {
+ return subchannel->channelz_subchannel.get();
}
static void continue_connect_locked(grpc_subchannel* c) {