Zebediah Figura : ws2_32: Return TRUE from WSAGetOverlappedResult() if the NT status denotes success.

Alexandre Julliard julliard at winehq.org
Fri May 7 15:42:02 CDT 2021


Module: wine
Branch: master
Commit: 0abc3245719e21b11299a5901e88c0a3495716ff
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0abc3245719e21b11299a5901e88c0a3495716ff

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu May  6 17:54:07 2021 -0500

ws2_32: Return TRUE from WSAGetOverlappedResult() if the NT status denotes success.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ws2_32/socket.c     | 2 +-
 dlls/ws2_32/tests/sock.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 273a6b159f4..3a8bfa0ce41 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -5738,7 +5738,7 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
         *lpdwFlags = lpOverlapped->u.s.Offset;
 
     SetLastError( NtStatusToWSAError(status) );
-    return !status;
+    return NT_SUCCESS( status );
 }
 
 
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index a84f05becbf..eeba272076b 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -8690,8 +8690,7 @@ static void test_WSAGetOverlappedResult(void)
             overlapped.Internal = status;
             WSASetLastError(0xdeadbeef);
             ret = WSAGetOverlappedResult(s, &overlapped, &size, FALSE, &flags);
-            todo_wine_if (expect_ret && status)
-                ok(ret == expect_ret, "status %#x: expected %d, got %d\n", status, expect_ret, ret);
+            ok(ret == expect_ret, "status %#x: expected %d, got %d\n", status, expect_ret, ret);
             if (ret)
             {
                 ok(WSAGetLastError() == expect /* >= win10 1809 */




More information about the wine-cvs mailing list