ws2_32: Use better types for some variables.

Michael Stefaniuc mstefani at redhat.de
Fri Apr 17 03:35:21 CDT 2009


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

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index cabe191..0031ad2 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2382,7 +2382,7 @@ INT WINAPI WSAIoctl(SOCKET s,
 int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp)
 {
     int fd;
-    long newcmd  = cmd;
+    LONG newcmd  = cmd;
 
     TRACE("socket %04lx, cmd %08x, ptr %p\n", s, cmd, argp);
     /* broken apps like defcon pass the argp value directly instead of a pointer to it */
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index ffc7ba9..0194e2e 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1996,8 +1996,8 @@ static void test_ioctlsocket(void)
 {
     SOCKET sock;
     int ret;
-    long cmds[] = {FIONBIO, FIONREAD, SIOCATMARK};
-    int i;
+    LONG cmds[] = {FIONBIO, FIONREAD, SIOCATMARK};
+    UINT i;
 
     sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
     ok(sock != INVALID_SOCKET, "Creating the socket failed: %d\n", WSAGetLastError());
@@ -2007,7 +2007,7 @@ static void test_ioctlsocket(void)
         return;
     }
 
-    for(i = 0; i < sizeof(cmds)/sizeof(long); i++)
+    for(i = 0; i < sizeof(cmds)/sizeof(cmds[0]); i++)
     {
         /* broken apps like defcon pass the argp value directly instead of a pointer to it */
         ret = ioctlsocket(sock, cmds[i], (u_long *)1);
-- 
1.6.0.6



More information about the wine-patches mailing list