Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-25 01:14:04 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-25 01:14:04 +0400
commite773b7cf30838eede30a357f83a5a1e37f006fd0 (patch)
treec4a01d9beb11fbe801442ac52b05b06a0fbfa2e9
parente08a611849d98d2823057994190e97d1d2b4a261 (diff)
* dtable.cc (dtable::find_unused_handle): Avoid coercion.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/dtable.cc3
2 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0be5f97ff..492a96cea 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2002-06-24 Christopher Faylor <cgf@redhat.com>
+ * dtable.cc (dtable::find_unused_handle): Avoid coercion.
+
+2002-06-24 Christopher Faylor <cgf@redhat.com>
+
* dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
off in error condition.
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 95225bb49..bc7a86ee0 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -167,10 +167,9 @@ int
dtable::find_unused_handle (int start)
{
AssertResourceOwner (LOCK_FD_LIST, READ_LOCK);
-
do
{
- for (int i = start; i < (int) size; i++)
+ for (size_t i = start; i < size; i++)
/* See if open -- no need for overhead of not_open */
if (fds[i] == NULL)
return i;