From 0a190c7644cea445ace69de97a8f7422e24f00c6 Mon Sep 17 00:00:00 2001 From: "zhangxiaoyu.york" Date: Wed, 4 Sep 2024 22:37:11 +0800 Subject: [PATCH] clang-format --- src/SyncClient.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SyncClient.cpp b/src/SyncClient.cpp index aeb5559..679be12 100644 --- a/src/SyncClient.cpp +++ b/src/SyncClient.cpp @@ -113,10 +113,11 @@ static bool dns_resolve(std::string const& target, return false; } - std::string host(target.substr(0,rindex)); + 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; }