diff --git a/src/core/ext/xds/xds_bootstrap_grpc.cc b/src/core/ext/xds/xds_bootstrap_grpc.cc index 1f48db3ef27..dcd5c918091 100644 --- a/src/core/ext/xds/xds_bootstrap_grpc.cc +++ b/src/core/ext/xds/xds_bootstrap_grpc.cc @@ -237,7 +237,7 @@ void GrpcXdsBootstrap::GrpcAuthority::JsonPostLoad( ValidationErrors* /*errors*/) { if (!IsFallbackExperimentEnabled()) { if (servers_.size() > 1) { - servers_ = {servers_[0]}; + servers_.resize(1); } } } @@ -250,10 +250,8 @@ absl::StatusOr> GrpcXdsBootstrap::Create( absl::string_view json_string) { auto json = JsonParse(json_string); if (!json.ok()) { - return absl::InvalidArgumentError( - absl::StrCat("Failed to parse bootstrap " - "JSON string: ", - json.status().ToString())); + return absl::InvalidArgumentError(absl::StrCat( + "Failed to parse bootstrap JSON string: ", json.status().ToString())); } // Validate JSON. class XdsJsonArgs : public JsonArgs { @@ -320,7 +318,7 @@ void GrpcXdsBootstrap::JsonPostLoad(const Json& /*json*/, } if (!IsFallbackExperimentEnabled()) { if (servers_.size() > 1) { - servers_ = {servers_[0]}; + servers_.resize(1); } } }