ws2_32: ioctlsocket should try to check if argp is valid

Juan Lang juan.lang at
Tue Sep 9 11:57:56 CDT 2008

Hi Jeff, I have a stylistic complaint about your tests in this patch:

+    if(sock == INVALID_SOCKET)
+    {
+        ok(0, "Creating the socket failed: %d, skipping test\n",
+        return;
+    }
If you intend to skip a test, shouldn't you use skip instead?

+        ret = ioctlsocket(sock, cmds[i], (u_long *)1);
+        if(ret != SOCKET_ERROR)
+           ok(0, "ioctlsocket succeeded unexpectedly\n");
+        else
+        {
I'm not a fan of the ok(0) approach here.  Why not use ok(ret ==
SOCKET_ERROR) instead?

More information about the wine-devel mailing list