osdep: remove use of socket_error() from all code

Now that QEMU wraps the Win32 sockets methods to automatically
set errno upon failure, there is no reason for callers to use
the socket_error() method. They can rely on accessing errno
even on Win32. Remove all use of socket_error() from general
code, leaving it as a static method in oslib-win32.c only.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2016-03-07 20:36:03 +00:00
parent a2d96af4bb
commit b16a44e13e
11 changed files with 46 additions and 63 deletions

View file

@ -145,7 +145,7 @@ int socket_set_fast_reuse(int fd)
}
int socket_error(void)
static int socket_error(void)
{
switch (WSAGetLastError()) {
case 0: