COMP: If both tests are succesfull, prevent compiler error

This commit is contained in:
Andy Cedilnik 2004-10-07 07:39:28 -04:00
parent 8732505a17
commit 7d0b2eabd6
1 changed files with 15 additions and 11 deletions

View File

@ -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