Description
WSASocketW does the following after calling WSPSocket:
569 /* Check if we got a valid socket */ |
570 if (Status == WSAEINVAL) |
571 {
|
572 Status = INVALID_SOCKET;
|
573 ErrorCode = WSAEINVAL;
|
574 }
|
This is a huge hack. WSPSocket should just properly return a socket or INVALID_SOCKET, and set lpErrno.
(in fact this code block is even duplicated – which is why Coverity complained about it in CID 1400935)