* hinfo.cc (hinfo::dup2): Eliminate compiler warning.

This commit is contained in:
Christopher Faylor 2000-06-26 21:36:52 +00:00
parent 5a449743bb
commit 9cef3cc0d7
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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);