Merge pull request #318 from svost/c++11
authorCryptoManiac <CryptoManiac@users.noreply.github.com>
Sat, 16 Apr 2016 15:10:28 +0000 (18:10 +0300)
committerCryptoManiac <CryptoManiac@users.noreply.github.com>
Sat, 16 Apr 2016 15:10:28 +0000 (18:10 +0300)
Minor restyle whith std=c++11

src/stun.cpp

index f344de0..6122325 100644 (file)
@@ -515,7 +515,7 @@ static int StunRequest(const char *host, uint16_t port, struct sockaddr_in *mapp
     client.sin_addr.s_addr = htonl(INADDR_ANY);
 
     int rc = -3;
-    if (::bind(sock, (struct sockaddr*)&client, sizeof(client)) != INVALID_SOCKET)
+    if (::bind(sock, (struct sockaddr*)&client, sizeof(client)) != SOCKET_ERROR)
         rc = StunRequest2(sock, &server, mapped);
     CloseSocket(sock);
     return rc;