* hinfo.cc (hinfo::dup2): Eliminate compiler warning.
This commit is contained in:
parent
5a449743bb
commit
9cef3cc0d7
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue