aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorThomas Snider <tjps636@gmail.com>2018-01-26 02:48:56 -0800
committerThomas Snider <tjps636@gmail.com>2018-04-16 13:24:14 -0700
commit2c084a6609bed24979c2a144743007f8b10a5c70 (patch)
treedf9527a3ce02aa01c5d55fd6b660ead4698e954b /src/netbase.cpp
parent07825088f9cfd8abece774b9d978c36ab90ce3d1 (diff)
net: Minor accumulated cleanups
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 5d3d2f25c8..57835b5427 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -513,11 +513,7 @@ bool ConnectSocketDirectly(const CService &addrConnect, const SOCKET& hSocket, i
return false;
}
socklen_t nRetSize = sizeof(nRet);
-#ifdef WIN32
- if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, (char*)(&nRet), &nRetSize) == SOCKET_ERROR)
-#else
- if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, &nRet, &nRetSize) == SOCKET_ERROR)
-#endif
+ if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, (sockopt_arg_type)&nRet, &nRetSize) == SOCKET_ERROR)
{
LogPrintf("getsockopt() for %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
return false;