]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
fix comment and line spacing
authorYang Tse <yangsita@gmail.com>
Thu, 19 Apr 2007 20:16:28 +0000 (20:16 +0000)
committerYang Tse <yangsita@gmail.com>
Thu, 19 Apr 2007 20:16:28 +0000 (20:16 +0000)
lib/connect.c

index dd67638fff0409597760c0b31e2b6e78ce78a55f..57e203657b2c5bb4836cc330de5e4ec595a299e1 100644 (file)
@@ -432,16 +432,15 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
 
 #endif
 
-  if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
-                       (void *)&err, &errSize))
+  if (0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
     err = SOCKERRNO;
-
 #ifdef _WIN32_WCE
-  /* Always returns this error, bug in CE? */
-  if(WSAENOPROTOOPT==err)
-    err=0;
+  /* Old WinCE versions don't support SO_ERROR */
+  if (WSAENOPROTOOPT == err) {
+    SET_SOCKERRNO(0);
+    err = 0;
+  }
 #endif
-
   if ((0 == err) || (EISCONN == err))
     /* we are connected, awesome! */
     rc = TRUE;