From 9cef3cc0d7af7f305df62af6d562d402ebe5398b Mon Sep 17 00:00:00 2001 From: Christopher Faylor <me@cgf.cx> Date: Mon, 26 Jun 2000 21:36:52 +0000 Subject: [PATCH] * hinfo.cc (hinfo::dup2): Eliminate compiler warning. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/dtable.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 59a963fea..dcfee80e9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Mon Jun 26 17:34:54 2000 Christopher Faylor <cgf@cygnus.com> + + * hinfo.cc (hinfo::dup2): Eliminate compiler warning. + Mon Jun 26 11:25:29 2000 Christopher Faylor <cgf@cygnus.com> * hinfo.cc (hinfo::dup2): Guard against out of bounds newfd. diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 9f9d0b65b..dea636105 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -342,7 +342,7 @@ hinfo::dup2 (int oldfd, int newfd) } SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup"); - if (newfd >= dtable.size || newfd < 0) + if ((size_t) newfd >= dtable.size || newfd < 0) { syscall_printf ("new fd out of bounds: %d", newfd); set_errno (EBADF);