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:
authorChristopher Faylor <me@cgf.cx>2001-04-23 20:46:30 +0400
committerChristopher Faylor <me@cgf.cx>2001-04-23 20:46:30 +0400
commitf940c5b1aa1a06097df8fffcc4c409c1f0702d4c (patch)
treeed43de512e56e0d82af44f07f856c9f6ddb0a23d /winsup/cygwin/net.cc
parent4ba81bbab20d1d68a89b8d983dfa5ae0129f22d7 (diff)
* net.cc [errmap]: Add '0' condition.
(find_winsock_errno): Don't translate no error to EPERM.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 990df2451..30b090164 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -245,13 +245,14 @@ static struct tl errmap[] =
{WSAEREMOTE, "WSAEREMOTE", EREMOTE},
{WSAEINVAL, "WSAEINVAL", EINVAL},
{WSAEFAULT, "WSAEFAULT", EFAULT},
+ {0, "NOERROR", 0},
{0, NULL, 0}
};
static int
find_winsock_errno (int why)
{
- for (int i = 0; errmap[i].w != 0; ++i)
+ for (int i = 0; errmap[i].s != NULL; ++i)
if (why == errmap[i].w)
return errmap[i].e;