aboutsummaryrefslogtreecommitdiff
path: root/sim/common/callback.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2011-02-25 22:28:57 +0000
committerKevin Buettner <kevinb@redhat.com>2011-02-25 22:28:57 +0000
commitfee17b3562f739225ed7e25a4ccb9684eb0de48c (patch)
tree788b7f2c8c280526cce69c549198ad2baf873916 /sim/common/callback.c
parent7f6485879552ec8109b65f4b725a20c13f7411fe (diff)
downloadgdb-fee17b3562f739225ed7e25a4ccb9684eb0de48c.zip
gdb-fee17b3562f739225ed7e25a4ccb9684eb0de48c.tar.gz
gdb-fee17b3562f739225ed7e25a4ccb9684eb0de48c.tar.bz2
* callback.c (fdbad): Return EBADF rather than EINVAL for bad
file descriptors.
Diffstat (limited to 'sim/common/callback.c')
-rw-r--r--sim/common/callback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/common/callback.c b/sim/common/callback.c
index 8f8aa9c..f811304 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -121,7 +121,7 @@ fdbad (p, fd)
{
if (fd < 0 || fd > MAX_CALLBACK_FDS || p->fd_buddy[fd] < 0)
{
- p->last_errno = EINVAL;
+ p->last_errno = EBADF;
return -1;
}
return 0;