Commit 05ccc6d1 authored by zhujiashun's avatar zhujiashun

add parameter comment to str2endpoint in discovery naming service

parent 3369f2cb
......@@ -117,6 +117,9 @@ int DiscoveryNamingService::ParseFetchsResult(
addr.remove_prefix(pos + 3);
}
ServerNode node;
// Variable addr contains data from addrs[j].GetString(), it is a
// null-terminated string, so it is safe to pass addr.data() as the
// first parameter to str2endpoint.
if (str2endpoint(addr.data(), &node.addr) != 0) {
LOG(ERROR) << "Invalid address=`" << addr << '\'';
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment