diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-01-11 17:48:15 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-01-11 17:48:15 -0500 |
commit | 05485a47ea107737ada8b0941a7a066c6a075f40 (patch) | |
tree | 8bf8a5fee750b20a631f02f60e6db21788ecc14f /cpp/src/Ice/Network.cpp | |
parent | Moved UniquePtr to IceInternal (diff) | |
download | ice-05485a47ea107737ada8b0941a7a066c6a075f40.tar.bz2 ice-05485a47ea107737ada8b0941a7a066c6a075f40.tar.xz ice-05485a47ea107737ada8b0941a7a066c6a075f40.zip |
Replace NULL by ICE_NULLPTR
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rwxr-xr-x | cpp/src/Ice/Network.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 95e9a49249d..c89bc020c2a 100755 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -182,7 +182,7 @@ setTcpLoopbackFastPath(SOCKET fd) DWORD NumberOfBytesReturned = 0; int status = - WSAIoctl(fd, SIO_LOOPBACK_FAST_PATH, &OptionValue, sizeof(OptionValue), NULL, 0, &NumberOfBytesReturned, 0, 0); + WSAIoctl(fd, SIO_LOOPBACK_FAST_PATH, &OptionValue, sizeof(OptionValue), ICE_NULLPTR, 0, &NumberOfBytesReturned, 0, 0); if(status == SOCKET_ERROR) { // On platforms that do not support fast path (< Windows 8), WSAEONOTSUPP is expected. @@ -283,16 +283,16 @@ getLocalAddresses(ProtocolSupport protocol, bool includeLoopback) } DWORD size; - DWORD rv = GetAdaptersAddresses(family, 0, NULL, NULL, &size); + DWORD rv = GetAdaptersAddresses(family, 0, ICE_NULLPTR, ICE_NULLPTR, &size); if(rv == ERROR_BUFFER_OVERFLOW) { PIP_ADAPTER_ADDRESSES adapter_addresses = (PIP_ADAPTER_ADDRESSES) malloc(size); - rv = GetAdaptersAddresses(family, 0, NULL, adapter_addresses, &size); + rv = GetAdaptersAddresses(family, 0, ICE_NULLPTR, adapter_addresses, &size); if(rv == ERROR_SUCCESS) { - for(PIP_ADAPTER_ADDRESSES aa = adapter_addresses; aa != NULL; aa = aa->Next) + for(PIP_ADAPTER_ADDRESSES aa = adapter_addresses; aa != ICE_NULLPTR; aa = aa->Next) { - for(PIP_ADAPTER_UNICAST_ADDRESS ua = aa->FirstUnicastAddress; ua != NULL; ua = ua->Next) + for(PIP_ADAPTER_UNICAST_ADDRESS ua = aa->FirstUnicastAddress; ua != ICE_NULLPTR; ua = ua->Next) { Address addr; memcpy(&addr.saStorage, ua->Address.lpSockaddr, ua->Address.iSockaddrLength); @@ -1105,7 +1105,7 @@ IceInternal::getAddresses(const string& host, int port, ProtocolSupport protocol throw ex; } - for(struct addrinfo* p = info; p != NULL; p = p->ai_next) + for(struct addrinfo* p = info; p != ICE_NULLPTR; p = p->ai_next) { memcpy(&addr.saStorage, p->ai_addr, p->ai_addrlen); if(p->ai_family == PF_INET) @@ -2910,7 +2910,7 @@ IceInternal::doConnectAsync(SOCKET fd, const Address& addr, const Address& sourc throw ex; } - LPFN_CONNECTEX ConnectEx = NULL; // a pointer to the 'ConnectEx()' function + LPFN_CONNECTEX ConnectEx = ICE_NULLPTR; // a pointer to the 'ConnectEx()' function GUID GuidConnectEx = WSAID_CONNECTEX; // The Guid DWORD dwBytes; if(WSAIoctl(fd, @@ -2920,8 +2920,8 @@ IceInternal::doConnectAsync(SOCKET fd, const Address& addr, const Address& sourc &ConnectEx, sizeof(ConnectEx), &dwBytes, - NULL, - NULL) == SOCKET_ERROR) + ICE_NULLPTR, + ICE_NULLPTR) == SOCKET_ERROR) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); @@ -2985,7 +2985,7 @@ IceInternal::doFinishConnectAsync(SOCKET fd, AsyncInfo& info) } } - if(setsockopt(fd, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == SOCKET_ERROR) + if(setsockopt(fd, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, ICE_NULLPTR, 0) == SOCKET_ERROR) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); |