From f940c5b1aa1a06097df8fffcc4c409c1f0702d4c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 23 Apr 2001 16:46:30 +0000 Subject: * net.cc [errmap]: Add '0' condition. (find_winsock_errno): Don't translate no error to EPERM. --- winsup/cygwin/net.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/net.cc') 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; -- cgit v1.2.3