Author: rjung
Date: Sat Nov 18 06:54:22 2006
New Revision: 476532
URL: http://svn.apache.org/viewvc?view=rev&rev=476532
Log:
Eliminate -1 or INVALID_SOCKET, use the existing defines and macros instead.
Modified:
tomcat/connectors/trunk/jk/native/common/jk_connect.c
Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c
URL:
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?view=diff&rev=476532&r1=476531&r2=476532
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sat Nov 18 06:54:22
2006
@@ -467,11 +467,10 @@
int jk_close_socket(jk_sock_t s)
{
+ if (IS_VALID_SOCKET(s))
#if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
- if (s != INVALID_SOCKET)
return closesocket(s) ? -1 : 0;
#else
- if (s != -1)
return close(s);
#endif
@@ -498,11 +497,10 @@
int rc = 0;
#if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
int tmout = SECONDS_TO_LINGER * 1000;
- if (s == INVALID_SOCKET)
#else
struct timeval tv;
- if (s < 0)
#endif
+ if (!IS_VALID_SOCKET(s))
return -1;
/* Shut down the socket for write, which will send a FIN
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]