aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-10-16 11:03:29 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-10-16 11:03:29 -0700
commit58486521aeb911758f5b6f801dceb421bd6bb2df (patch)
tree0bdc55fe07ded6644ae3616eee79471cdc8d0cd6 /src
parentce386533728a9708bd903645ef09ed679d3fc531 (diff)
s/more_to_come/reached_pagination_limit
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/channel/channelz_registry.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/lib/channel/channelz_registry.cc b/src/core/lib/channel/channelz_registry.cc
index c6944afb68..e90a9e1f7f 100644
--- a/src/core/lib/channel/channelz_registry.cc
+++ b/src/core/lib/channel/channelz_registry.cc
@@ -136,7 +136,7 @@ char* ChannelzRegistry::InternalGetTopChannels(intptr_t start_channel_id) {
// start_channel_id=0, which signifies "give me everything." Hence this
// funky looking line below.
size_t start_idx = start_channel_id == 0 ? 0 : start_channel_id - 1;
- bool more_to_come = false;
+ bool reached_pagination_limit = false;
for (size_t i = start_idx; i < entities_.size(); ++i) {
if (entities_[i] != nullptr &&
entities_[i]->type() ==
@@ -145,7 +145,7 @@ char* ChannelzRegistry::InternalGetTopChannels(intptr_t start_channel_id) {
// the "end" element. If we don't go through this block, we know that
// when the loop terminates, we have <= to kPaginationLimit.
if (top_level_channels.size() == kPaginationLimit) {
- more_to_come = true;
+ reached_pagination_limit = true;
break;
}
top_level_channels.push_back(entities_[i]);
@@ -161,7 +161,7 @@ char* ChannelzRegistry::InternalGetTopChannels(intptr_t start_channel_id) {
grpc_json_link_child(array_parent, channel_json, json_iterator);
}
}
- if (!more_to_come) {
+ if (!reached_pagination_limit) {
grpc_json_create_child(nullptr, json, "end", nullptr, GRPC_JSON_TRUE,
false);
}
@@ -180,7 +180,7 @@ char* ChannelzRegistry::InternalGetServers(intptr_t start_server_id) {
// reserved). However, we want to support requests coming in with
// start_server_id=0, which signifies "give me everything."
size_t start_idx = start_server_id == 0 ? 0 : start_server_id - 1;
- bool more_to_come = false;
+ bool reached_pagination_limit = false;
for (size_t i = start_idx; i < entities_.size(); ++i) {
if (entities_[i] != nullptr &&
entities_[i]->type() ==
@@ -189,7 +189,7 @@ char* ChannelzRegistry::InternalGetServers(intptr_t start_server_id) {
// the "end" element. If we don't go through this block, we know that
// when the loop terminates, we have <= to kPaginationLimit.
if (servers.size() == kPaginationLimit) {
- more_to_come = true;
+ reached_pagination_limit = true;
break;
}
servers.push_back(entities_[i]);
@@ -205,7 +205,7 @@ char* ChannelzRegistry::InternalGetServers(intptr_t start_server_id) {
grpc_json_link_child(array_parent, server_json, json_iterator);
}
}
- if (!more_to_come) {
+ if (!reached_pagination_limit) {
grpc_json_create_child(nullptr, json, "end", nullptr, GRPC_JSON_TRUE,
false);
}