summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/kill_sessions_remote.cpp
diff options
context:
space:
mode:
authorTommaso Tocci <tommaso.tocci@mongodb.com>2020-12-29 21:08:18 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-12-31 13:06:06 +0000
commitc912b95e72f281506e58a943adb1c640c789311e (patch)
treec9b57e04d0fd8b0c8ef7e951fad44fdb2dfcc7b1 /src/mongo/s/commands/kill_sessions_remote.cpp
parentc3cb41d5d88308632d2da0c3f0d047487c3b66c3 (diff)
downloadmongo-c912b95e72f281506e58a943adb1c640c789311e.tar.gz
SERVER-53547 Make use of return values in ShardRegistry API
Diffstat (limited to 'src/mongo/s/commands/kill_sessions_remote.cpp')
-rw-r--r--src/mongo/s/commands/kill_sessions_remote.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/s/commands/kill_sessions_remote.cpp b/src/mongo/s/commands/kill_sessions_remote.cpp
index 0bda8eacf61..3e588f0fa9d 100644
--- a/src/mongo/s/commands/kill_sessions_remote.cpp
+++ b/src/mongo/s/commands/kill_sessions_remote.cpp
@@ -53,8 +53,7 @@ namespace {
std::vector<HostAndPort> getAllClusterHosts(OperationContext* opCtx) {
auto registry = Grid::get(opCtx)->shardRegistry();
- std::vector<ShardId> shardIds;
- registry->getAllShardIds(opCtx, &shardIds);
+ const auto shardIds = registry->getAllShardIds(opCtx);
std::vector<HostAndPort> servers;
for (const auto& shardId : shardIds) {