ws2_32: Use better types for some variables.

This commit is contained in:
Michael Stefaniuc 2009-04-17 10:35:21 +02:00 committed by Alexandre Julliard
parent b747284797
commit 0847e7d826
2 changed files with 4 additions and 4 deletions

View File

@ -2382,7 +2382,7 @@ INT WINAPI WSAIoctl(SOCKET s,
int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp) int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp)
{ {
int fd; int fd;
long newcmd = cmd; LONG newcmd = cmd;
TRACE("socket %04lx, cmd %08x, ptr %p\n", s, cmd, argp); 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 */ /* broken apps like defcon pass the argp value directly instead of a pointer to it */

View File

@ -1996,8 +1996,8 @@ static void test_ioctlsocket(void)
{ {
SOCKET sock; SOCKET sock;
int ret; int ret;
long cmds[] = {FIONBIO, FIONREAD, SIOCATMARK}; static const LONG cmds[] = {FIONBIO, FIONREAD, SIOCATMARK};
int i; UINT i;
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
ok(sock != INVALID_SOCKET, "Creating the socket failed: %d\n", WSAGetLastError()); ok(sock != INVALID_SOCKET, "Creating the socket failed: %d\n", WSAGetLastError());
@ -2007,7 +2007,7 @@ static void test_ioctlsocket(void)
return; 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 */ /* broken apps like defcon pass the argp value directly instead of a pointer to it */
ret = ioctlsocket(sock, cmds[i], (u_long *)1); ret = ioctlsocket(sock, cmds[i], (u_long *)1);