* callback.c (fdbad): Return EBADF rather than EINVAL for bad

file descriptors.
This commit is contained in:
Kevin Buettner 2011-02-25 22:28:57 +00:00
parent 7f64858795
commit fee17b3562
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-02-25 Kevin Buettner <kevinb@redhat.com>
* callback.c (fdbad): Return EBADF rather than EINVAL for bad
file descriptors.
2011-02-14 Mike Frysinger <vapier@gentoo.org>
* hw-alloc.c (hw_alloc_data): Delete zalloc_p.

View File

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