filedesc: plug a test for impossible condition in fgetvp_rights

This commit is contained in:
mjg 2014-11-23 00:12:27 +00:00
parent 2a34ef3d27
commit e31a493d7e

View File

@ -2571,9 +2571,7 @@ fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp,
int error;
#endif
if (td == NULL || (fdp = td->td_proc->p_fd) == NULL)
return (EBADF);
fdp = td->td_proc->p_fd;
fp = fget_locked(fdp, fd);
if (fp == NULL || fp->f_ops == &badfileops)
return (EBADF);