summaryrefslogtreecommitdiff
path: root/ghc/lib/misc/cbits/shutdownSocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/lib/misc/cbits/shutdownSocket.c')
-rw-r--r--ghc/lib/misc/cbits/shutdownSocket.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/ghc/lib/misc/cbits/shutdownSocket.c b/ghc/lib/misc/cbits/shutdownSocket.c
index b378b2d5cb..f5332bf793 100644
--- a/ghc/lib/misc/cbits/shutdownSocket.c
+++ b/ghc/lib/misc/cbits/shutdownSocket.c
@@ -19,23 +19,7 @@ shutdownSocket(I_ sockfd, I_ how)
while ((rc = shutdown((int) sockfd, (int) how)) < 0) {
if (errno != EINTR) {
cvtErrno();
- switch (ghc_errno) {
- default:
- stdErrno();
- break;
- case GHC_EBADF:
- ghc_errtype = ERR_INVALIDARGUMENT;
- ghc_errstr = "Not a valid write descriptor";
- break;
- case GHC_ENOTCONN:
- ghc_errtype = ERR_INVALIDARGUMENT;
- ghc_errstr = "Socket not connected";
- break;
- case GHC_ENOTSOCK:
- ghc_errtype = ERR_INVALIDARGUMENT;
- ghc_errstr = "Descriptor is not a socket";
- break;
- }
+ stdErrno();
return -1;
}
}