Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
35555862
Commit
35555862
authored
Oct 20, 2011
by
Andrew Talbot
Committed by
Alexandre Julliard
Oct 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Replace switch statement with more suitable if statement.
parent
4bebe628
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
socket.c
dlls/ws2_32/socket.c
+11
-7
No files found.
dlls/ws2_32/socket.c
View file @
35555862
...
...
@@ -5356,14 +5356,18 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
}
if
(
af
==
AF_UNSPEC
)
/* did they not specify the address family? */
switch
(
protocol
)
{
case
IPPROTO_TCP
:
if
(
type
==
SOCK_STREAM
)
{
af
=
AF_INET
;
break
;
}
case
IPPROTO_UDP
:
if
(
type
==
SOCK_DGRAM
)
{
af
=
AF_INET
;
break
;
}
default:
SetLastError
(
WSAEPROTOTYPE
);
return
INVALID_SOCKET
;
{
if
((
protocol
==
IPPROTO_TCP
&&
type
==
SOCK_STREAM
)
||
(
protocol
==
IPPROTO_UDP
&&
type
==
SOCK_DGRAM
))
{
af
=
AF_INET
;
}
else
{
SetLastError
(
WSAEPROTOTYPE
);
return
INVALID_SOCKET
;
}
}
SERVER_START_REQ
(
create_socket
)
{
...
...
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