clang-format

This commit is contained in:
zhangxiaoyu.york 2024-09-04 22:37:11 +08:00
parent 8655c394b5
commit 0a190c7644
1 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,8 @@ static bool dns_resolve(std::string const& target,
std::string host(target.substr(0, rindex));
// host format is [ipv6]
if(!ipv4 && !host.empty() && host[0] == '[' && host[host.size()-1] == ']') {
if (!ipv4 && !host.empty() && host[0] == '[' &&
host[host.size() - 1] == ']') {
host = target.substr(1, rindex - 2);
ipv6_url = true;
}