[PATCH 2/5] ws2_32: Use NtStatusToWSAError() in WSAGetOverlappedResult().
Zebediah Figura
z.figura12 at gmail.com
Thu May 6 16:12:53 CDT 2021
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/ws2_32/socket.c | 2 +-
dlls/ws2_32/tests/sock.c | 11 +++--------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index ed7218f9fb7..273a6b159f4 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5737,7 +5737,7 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
if ( lpdwFlags )
*lpdwFlags = lpOverlapped->u.s.Offset;
- if (status) SetLastError( RtlNtStatusToDosError(status) );
+ SetLastError( NtStatusToWSAError(status) );
return !status;
}
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 627c12b8a1f..a84f05becbf 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -8701,14 +8701,9 @@ static void test_WSAGetOverlappedResult(void)
}
else
{
- todo_wine_if (!NT_SUCCESS(status)
- && LOWORD(status) != WSAEINVAL
- && status != STATUS_CANCELLED
- && status != (0x80070000 | ERROR_IO_INCOMPLETE)
- && status != (0xc0070000 | ERROR_IO_INCOMPLETE))
- ok(WSAGetLastError() == expect
- || (status == (0xc0070000 | ERROR_IO_INCOMPLETE) && WSAGetLastError() == WSAEINVAL), /* < win8 */
- "status %#x: expected error %u, got %u\n", status, expect, WSAGetLastError());
+ ok(WSAGetLastError() == expect
+ || (status == (0xc0070000 | ERROR_IO_INCOMPLETE) && WSAGetLastError() == WSAEINVAL), /* < win8 */
+ "status %#x: expected error %u, got %u\n", status, expect, WSAGetLastError());
}
}
}
--
2.30.2
More information about the wine-devel
mailing list