summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-12 22:31:10 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-12 22:31:10 +0000
commit88e8742526831624d376527f139f95dd93c7ae22 (patch)
tree59e79111205eb63e536f29dba5c5cbf84ab52d42 /net/socket
parent04a914d34c2df689185d0cc38542e608957ac184 (diff)
downloadchromium_src-88e8742526831624d376527f139f95dd93c7ae22.zip
chromium_src-88e8742526831624d376527f139f95dd93c7ae22.tar.gz
chromium_src-88e8742526831624d376527f139f95dd93c7ae22.tar.bz2
On Windows, the return value of socket() should be compared with
INVALID_SOCKET for failure. R=rsleevi@chromium.org BUG=271530 TEST=none Review URL: https://chromiumcodereview.appspot.com/22824005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217101 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/tcp_server_socket_win.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket/tcp_server_socket_win.cc b/net/socket/tcp_server_socket_win.cc
index 7ae7a85..0ac77be 100644
--- a/net/socket/tcp_server_socket_win.cc
+++ b/net/socket/tcp_server_socket_win.cc
@@ -45,7 +45,7 @@ int TCPServerSocketWin::Listen(const IPEndPoint& address, int backlog) {
}
socket_ = socket(address.GetSockAddrFamily(), SOCK_STREAM, IPPROTO_TCP);
- if (socket_ < 0) {
+ if (socket_ == INVALID_SOCKET) {
PLOG(ERROR) << "socket() returned an error";
return MapSystemError(WSAGetLastError());
}