* 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

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