harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r720174 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
Date Mon, 24 Nov 2008 12:22:44 GMT
Author: tellison
Date: Mon Nov 24 04:22:43 2008
New Revision: 720174

URL: http://svn.apache.org/viewvc?rev=720174&view=rev
Log:
Minor tidy-up to make code readable.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c?rev=720174&r1=720173&r2=720174&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
Mon Nov 24 04:22:43 2008
@@ -162,29 +162,29 @@
 
 /* Alternative Select function */
 int 
-selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept){
+selectRead (JNIEnv * env, hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept){
   PORT_ACCESS_FROM_ENV (env);
   hytimeval_struct timeP;
   hyfdset_t fdset_read;
   I_32 result = 0;
 
-  if (0 <= uSecTime)
-    hysock_timeval_init (0, uSecTime, &timeP);
-
   fdset_read = hymem_allocate_memory(sizeof (struct hyfdset_struct));
   FD_ZERO (&fdset_read->handle);
-  if (hysocketP->flags & SOCKET_IPV4_OPEN_MASK)
-    {
-      FD_SET (hysocketP->ipv4, &fdset_read->handle);
-    }
-  if (hysocketP->flags & SOCKET_IPV6_OPEN_MASK)
-    {
-      FD_SET (hysocketP->ipv6, &fdset_read->handle);
-    }
-  if (0 <= uSecTime)
-    result = hysock_select (0, fdset_read, NULL, NULL,&timeP);  
-  else
-    result = hysock_select (0, fdset_read, NULL, NULL,NULL);  
+
+  if (hysocketP->flags & SOCKET_IPV4_OPEN_MASK) {
+    FD_SET (hysocketP->ipv4, &fdset_read->handle);
+  }
+  if (hysocketP->flags & SOCKET_IPV6_OPEN_MASK) {
+    FD_SET (hysocketP->ipv6, &fdset_read->handle);
+  }
+
+  if (0 <= uSecTime) {
+    hysock_timeval_init (0, uSecTime, &timeP);
+    result = hysock_select(0, fdset_read, NULL, NULL, &timeP);
+  } else {
+    result = hysock_select(0, fdset_read, NULL, NULL, NULL);
+  }
+
   hymem_free_memory(fdset_read);
   return result;
 }



Mime
View raw message