ws2_32: ioctlsocket should try to check if argp is valid (try 2)

Juan Lang juan.lang at
Tue Sep 9 13:55:43 CDT 2008

Hi Jeff,

+    if(sock == INVALID_SOCKET)
+        skip("Creating the socket failed: %d, skipping test.\n",
skip needs a return too.

+        ret = ioctlsocket(sock, cmds[i], (u_long *)1);
+        if(ok(ret == SOCKET_ERROR, "ioctlsocket succeeded unexpectedly\n"))
+        {
I think you mean:
ok(ret == SOCKET_ERROR...)
if (ret == SOCKET_ERROR)
although really the if is unnecessary, as you won't cause a crash if
the first test fails.

More information about the wine-devel mailing list