mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-02 13:05:42 +08:00
* 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>
|
Mon Jun 26 11:25:29 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* hinfo.cc (hinfo::dup2): Guard against out of bounds newfd.
|
* 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");
|
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);
|
syscall_printf ("new fd out of bounds: %d", newfd);
|
||||||
set_errno (EBADF);
|
set_errno (EBADF);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user