summaryrefslogtreecommitdiff
path: root/zen/socket.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-09-07 14:49:22 -0400
committerB. Stack <bgstack15@gmail.com>2022-09-07 14:49:22 -0400
commit47c88c433d17948fab1d8e1d76121a72fe5938cb (patch)
treefbc1dea58a6b28f1af4a9e9b2bc8e3e1d23b2103 /zen/socket.h
parentMerge branch 'b11.23' into 'master' (diff)
downloadFreeFileSync-47c88c433d17948fab1d8e1d76121a72fe5938cb.tar.gz
FreeFileSync-47c88c433d17948fab1d8e1d76121a72fe5938cb.tar.bz2
FreeFileSync-47c88c433d17948fab1d8e1d76121a72fe5938cb.zip
add upstream 11.24
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