Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e948b2bf
Commit
e948b2bf
authored
Dec 04, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Remove some superfluous casts.
parent
683c53db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
sock.c
dlls/ws2_32/tests/sock.c
+8
-8
No files found.
dlls/ws2_32/tests/sock.c
View file @
e948b2bf
...
@@ -317,7 +317,7 @@ static void server_start ( server_params *par )
...
@@ -317,7 +317,7 @@ static void server_start ( server_params *par )
{
{
int
i
;
int
i
;
test_params
*
gen
=
par
->
general
;
test_params
*
gen
=
par
->
general
;
server_memory
*
mem
=
(
LPVOID
)
LocalAlloc
(
LPTR
,
sizeof
(
server_memory
)
);
server_memory
*
mem
=
LocalAlloc
(
LPTR
,
sizeof
(
server_memory
)
);
TlsSetValue
(
tls
,
mem
);
TlsSetValue
(
tls
,
mem
);
mem
->
s
=
WSASocketA
(
AF_INET
,
gen
->
sock_type
,
gen
->
sock_prot
,
mem
->
s
=
WSASocketA
(
AF_INET
,
gen
->
sock_type
,
gen
->
sock_prot
,
...
@@ -331,7 +331,7 @@ static void server_start ( server_params *par )
...
@@ -331,7 +331,7 @@ static void server_start ( server_params *par )
for
(
i
=
0
;
i
<
MAX_CLIENTS
;
i
++
)
for
(
i
=
0
;
i
<
MAX_CLIENTS
;
i
++
)
{
{
mem
->
sock
[
i
].
s
=
INVALID_SOCKET
;
mem
->
sock
[
i
].
s
=
INVALID_SOCKET
;
mem
->
sock
[
i
].
buf
=
(
LPVOID
)
LocalAlloc
(
LPTR
,
gen
->
n_chunks
*
gen
->
chunk_size
);
mem
->
sock
[
i
].
buf
=
LocalAlloc
(
LPTR
,
gen
->
n_chunks
*
gen
->
chunk_size
);
mem
->
sock
[
i
].
n_recvd
=
0
;
mem
->
sock
[
i
].
n_recvd
=
0
;
mem
->
sock
[
i
].
n_sent
=
0
;
mem
->
sock
[
i
].
n_sent
=
0
;
}
}
...
@@ -347,12 +347,12 @@ static void server_stop (void)
...
@@ -347,12 +347,12 @@ static void server_stop (void)
for
(
i
=
0
;
i
<
MAX_CLIENTS
;
i
++
)
for
(
i
=
0
;
i
<
MAX_CLIENTS
;
i
++
)
{
{
LocalFree
(
(
HANDLE
)
mem
->
sock
[
i
].
buf
);
LocalFree
(
mem
->
sock
[
i
].
buf
);
if
(
mem
->
sock
[
i
].
s
!=
INVALID_SOCKET
)
if
(
mem
->
sock
[
i
].
s
!=
INVALID_SOCKET
)
closesocket
(
mem
->
sock
[
i
].
s
);
closesocket
(
mem
->
sock
[
i
].
s
);
}
}
ok
(
closesocket
(
mem
->
s
)
==
0
,
"closesocket failed
\n
"
);
ok
(
closesocket
(
mem
->
s
)
==
0
,
"closesocket failed
\n
"
);
LocalFree
(
(
HANDLE
)
mem
);
LocalFree
(
mem
);
ExitThread
(
GetCurrentThreadId
()
);
ExitThread
(
GetCurrentThreadId
()
);
}
}
...
@@ -361,7 +361,7 @@ static void server_stop (void)
...
@@ -361,7 +361,7 @@ static void server_stop (void)
static
void
client_start
(
client_params
*
par
)
static
void
client_start
(
client_params
*
par
)
{
{
test_params
*
gen
=
par
->
general
;
test_params
*
gen
=
par
->
general
;
client_memory
*
mem
=
(
LPVOID
)
LocalAlloc
(
LPTR
,
sizeof
(
client_memory
));
client_memory
*
mem
=
LocalAlloc
(
LPTR
,
sizeof
(
client_memory
));
TlsSetValue
(
tls
,
mem
);
TlsSetValue
(
tls
,
mem
);
...
@@ -376,7 +376,7 @@ static void client_start ( client_params *par )
...
@@ -376,7 +376,7 @@ static void client_start ( client_params *par )
ok
(
mem
->
s
!=
INVALID_SOCKET
,
"Client: WSASocket failed
\n
"
);
ok
(
mem
->
s
!=
INVALID_SOCKET
,
"Client: WSASocket failed
\n
"
);
mem
->
send_buf
=
(
LPVOID
)
LocalAlloc
(
LPTR
,
2
*
gen
->
n_chunks
*
gen
->
chunk_size
);
mem
->
send_buf
=
LocalAlloc
(
LPTR
,
2
*
gen
->
n_chunks
*
gen
->
chunk_size
);
mem
->
recv_buf
=
mem
->
send_buf
+
gen
->
n_chunks
*
gen
->
chunk_size
;
mem
->
recv_buf
=
mem
->
send_buf
+
gen
->
n_chunks
*
gen
->
chunk_size
;
fill_buffer
(
mem
->
send_buf
,
gen
->
chunk_size
,
gen
->
n_chunks
);
fill_buffer
(
mem
->
send_buf
,
gen
->
chunk_size
,
gen
->
n_chunks
);
...
@@ -389,8 +389,8 @@ static void client_stop (void)
...
@@ -389,8 +389,8 @@ static void client_stop (void)
{
{
client_memory
*
mem
=
TlsGetValue
(
tls
);
client_memory
*
mem
=
TlsGetValue
(
tls
);
wsa_ok
(
closesocket
(
mem
->
s
),
0
==
,
"closesocket error (%x): %d
\n
"
);
wsa_ok
(
closesocket
(
mem
->
s
),
0
==
,
"closesocket error (%x): %d
\n
"
);
LocalFree
(
(
HANDLE
)
mem
->
send_buf
);
LocalFree
(
mem
->
send_buf
);
LocalFree
(
(
HANDLE
)
mem
);
LocalFree
(
mem
);
ExitThread
(
0
);
ExitThread
(
0
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment