Automated Code Change

PiperOrigin-RevId: 713549118
This commit is contained in:
A. Unique TensorFlower
2025-01-08 23:12:42 -08:00
committed by TensorFlower Gardener
parent 938cd492a5
commit 68ce340cf3

View File

@@ -159,8 +159,7 @@ absl::Status GrpcServer::GetHostAndPort(const ServerDef& server_def,
server_def.DebugString());
}
auto colon_index = iter->second.find_last_of(':');
if (!strings::safe_strto32(iter->second.substr(colon_index + 1),
port)) {
if (!absl::SimpleAtoi(iter->second.substr(colon_index + 1), port)) {
return errors::InvalidArgument(
"Could not parse port for local server from \"", iter->second,
"\".");
@@ -419,8 +418,7 @@ absl::Status GrpcServer::WorkerCacheFactory(
int requested_port;
auto colon_index = host_port.find_last_of(':');
if (!strings::safe_strto32(host_port.substr(colon_index + 1),
&requested_port)) {
if (!absl::SimpleAtoi(host_port.substr(colon_index + 1), &requested_port)) {
return errors::Internal("Could not parse port for local server from \"",
host_port, "\".");
}