Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix overflow warning in dumb_socketpair() on Win64
The SOCKET type is a pointer, although in practice what's returned really does look like a file descriptor. It's a low-valued integer such as 0x23 under Wine, 0x54 under Windows 7 in my testing. The INVALID_SOCKET error return from socket() is defined as (SOCKET)(~0), or 0xFFFFFFFFFFFFFFFF on Win64. Thus we get errors when assigning it to an int in the socks[] array. So use -1 here instead. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
- Loading branch information