summaryrefslogtreecommitdiff
path: root/zen/socket.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-09-07 18:49:36 +0000
committerB. Stack <bgstack15@gmail.com>2022-09-07 18:49:36 +0000
commit62bcefb8b809a32c6d26ab04ca686578bba5567a (patch)
treefbc1dea58a6b28f1af4a9e9b2bc8e3e1d23b2103 /zen/socket.h
parentMerge branch 'b11.23' into 'master' (diff)
parentadd upstream 11.24 (diff)
downloadFreeFileSync-11.24.tar.gz
FreeFileSync-11.24.tar.bz2
FreeFileSync-11.24.zip
Merge branch 'b11.24' into 'master'11.24
add upstream 11.24 See merge request opensource-tracking/FreeFileSync!47
Diffstat (limited to 'zen/socket.h')
-rw-r--r--zen/socket.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/zen/socket.h b/zen/socket.h
index 5ece29f8..d9517bd8 100644
--- a/zen/socket.h
+++ b/zen/socket.h
@@ -33,11 +33,13 @@ class Socket //throw SysError
public:
Socket(const Zstring& server, const Zstring& serviceName) //throw SysError
{
- ::addrinfo hints = {};
- hints.ai_socktype = SOCK_STREAM; //we *do* care about this one!
- hints.ai_flags = AI_ADDRCONFIG; //save a AAAA lookup on machines that can't use the returned data anyhow
+ const addrinfo hints
+ {
+ .ai_flags = AI_ADDRCONFIG, //save a AAAA lookup on machines that can't use the returned data anyhow
+ .ai_socktype = SOCK_STREAM, //we *do* care about this one!
+ };
- ::addrinfo* servinfo = nullptr;
+ addrinfo* servinfo = nullptr;
ZEN_ON_SCOPE_EXIT(if (servinfo) ::freeaddrinfo(servinfo));
const int rcGai = ::getaddrinfo(server.c_str(), serviceName.c_str(), &hints, &servinfo);
bgstack15