[EMAIL PROTECTED] wrote:
Log:
Add function description comments and
switch return values of jk_is_socket_connected()
from 0/1 to JK_FALSE/JK_TRUE.

-            return nr == 0 ? 0 : 1;
+            return nr == JK_FALSE ? JK_FALSE : JK_TRUE;


         int nr;
         if (ioctl(sock, FIONREAD, (void*)&nr) == 0) {
-            return nr == 0 ? 0 : 1;
+            return nr == JK_FALSE ? JK_FALSE : JK_TRUE;
         }

This should actually be:
return nr == 0 ? JK_FALSE : JK_TRUE;
if you wish to return JK_TRUE/JK_FALSE

We are testing for 0 not for JK_FALSE (which happens to be zero)
that can be defined to anything.

Regards,
Mladen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to