filedesc: plug a test for impossible condition in _fget

This commit is contained in:
Mateusz Guzik 2015-01-21 01:06:14 +00:00
parent 4098ccafa4
commit c31c057957
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277461

View File

@ -2439,8 +2439,7 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags,
int error;
*fpp = NULL;
if (td == NULL || (fdp = td->td_proc->p_fd) == NULL)
return (EBADF);
fdp = td->td_proc->p_fd;
if (needrightsp != NULL)
needrights = *needrightsp;
else