getpeername() and getsockname() return errors in errno not h_errno.

This commit is contained in:
David Luyer 1999-09-22 15:09:22 +00:00 committed by Alexandre Julliard
parent e92331ffd0
commit 63682fd9c2
1 changed files with 2 additions and 2 deletions

View File

@ -1037,7 +1037,7 @@ INT WINAPI WINSOCK_getpeername(SOCKET s, struct sockaddr *name,
#endif
return 0;
}
SetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno());
SetLastError(wsaErrno());
}
#ifdef HAVE_IPX
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {
@ -1103,7 +1103,7 @@ INT WINAPI WINSOCK_getsockname(SOCKET s, struct sockaddr *name,
#endif
return 0;
}
SetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno());
SetLastError(wsaErrno());
}
#ifdef HAVE_IPX
if (name && ((struct ws_sockaddr_ipx *)name)->sipx_family == AF_IPX) {