From 3b9d70b08e7309ff294e20e2d2be617a9a182bc6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 4 Nov 1996 04:45:02 +0000 Subject: Fix seems to be unnecssary. Weird. svn path=/trunk/; revision=470 --- socket.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'socket.c') diff --git a/socket.c b/socket.c index 64d7481e..3dcdccaa 100644 --- a/socket.c +++ b/socket.c @@ -52,10 +52,7 @@ int clientPort; if (sock < 0) return (FILE *)NULL; - /* under 2.0.23, connect(2) doesn't return -1 on ENETUNREACH failure */ - errno = 0; - connect(sock, (struct sockaddr *) &ad, sizeof(ad)); - if (errno != 0) + if (connect(sock, (struct sockaddr *) &ad, sizeof(ad)) < 0) { close(sock); return (FILE *)NULL; -- cgit v1.2.3