Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-02-26 19:56:47 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-02-26 19:56:47 +0300
commitd35bd22992cc08d5c04ff822959bacd863abf41b (patch)
tree219a73d6eac68308904509f8cc1cc696139a129c /winsup/cygwin/net.cc
parent1e5e44a9a5fa0b7f0bfc876f534221f709f01d66 (diff)
Cygwin: sockets: move type and proto checks into fhandler_socket classes
Encapsulation required Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index bd0a169dd..4fcc577bb 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -517,25 +517,10 @@ cygwin_socket (int af, int type, int protocol)
{
case AF_LOCAL:
case AF_UNIX:
- if (type != SOCK_STREAM && type != SOCK_DGRAM)
- {
- set_errno (EINVAL);
- goto done;
- }
- if (protocol != 0)
- {
- set_errno (EPROTONOSUPPORT);
- goto done;
- }
dev = (af == AF_LOCAL) ? af_local_dev : af_unix_dev;
break;
case AF_INET:
case AF_INET6:
- if (type != SOCK_STREAM && type != SOCK_DGRAM && type != SOCK_RAW)
- {
- set_errno (EINVAL);
- goto done;
- }
dev = af_inet_dev;
break;
default:
@@ -2314,16 +2299,6 @@ socketpair (int af, int type, int protocol, int *sb)
{
case AF_LOCAL:
case AF_UNIX:
- if (type != SOCK_STREAM && type != SOCK_DGRAM)
- {
- set_errno (EINVAL);
- goto done;
- }
- if (protocol != 0)
- {
- set_errno (EPROTONOSUPPORT);
- goto done;
- }
dev = (af == AF_LOCAL) ? af_local_dev : af_unix_dev;
break;
default: