This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: clean up select() call with 0 selectable descriptors


If no file descriptors are going to be set for selection we still tell
select() that descriptor 0 is selectable.   I don't think this really
make any difference at the application level, but we might as well clean
it up.  I haven't looked yet, but perhaps a similar patch is applicable
to GNU Classpath.   What do you think?

Thanks,

AG


2006-01-21  Anthony Green  <green@redhat.com>

	* gnu/java/nio/natSelectorImplPosix.cc (select): Start
	with max_fds = -1, not 0.


--- gnu/java/nio/natSelectorImplPosix.cc~	2006-01-14 18:13:43.000000000 -0800
+++ gnu/java/nio/natSelectorImplPosix.cc	2006-01-21 12:34:53.000000000 -0800
@@ -64,7 +64,7 @@
                                     jintArray except, jlong timeout)
 {
   jint result;
-  int max_fd = 0;
+  int max_fd = -1;
   fd_set read_fds;
   fd_set write_fds;
   fd_set except_fds;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]