From 7d0b2eabd66effc91b511b24632e3b4a70bc01b3 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik <andy.cedilnik@kitware.com> Date: Thu, 7 Oct 2004 07:39:28 -0400 Subject: COMP: If both tests are succesfull, prevent compiler error --- Source/CTest/Curl/connect.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Source/CTest/Curl/connect.c b/Source/CTest/Curl/connect.c index d9f2783..8963fa0 100644 --- a/Source/CTest/Curl/connect.c +++ b/Source/CTest/Curl/connect.c @@ -132,23 +132,27 @@ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */ { #undef SETBLOCK #ifdef HAVE_O_NONBLOCK - /* most recent unix versions */ - int flags; + { + /* most recent unix versions */ + int flags; - flags = fcntl(sockfd, F_GETFL, 0); - if (TRUE == nonblock) - return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); - else - return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); + flags = fcntl(sockfd, F_GETFL, 0); + if (TRUE == nonblock) + return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); + else + return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); + } #define SETBLOCK 1 #endif #ifdef HAVE_FIONBIO - /* older unix versions */ - int flags; + { + /* older unix versions */ + int flags; - flags = nonblock; - return ioctl(sockfd, FIONBIO, &flags); + flags = nonblock; + return ioctl(sockfd, FIONBIO, &flags); + } #define SETBLOCK 2 #endif -- cgit v0.12