Author: mjg
Date: Sun Nov 23 00:12:27 2014
New Revision: 274904
URL: https://svnweb.freebsd.org/changeset/base/274904

Log:
  filedesc: plug a test for impossible condition in fgetvp_rights

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c        Sun Nov 23 00:08:43 2014        
(r274903)
+++ head/sys/kern/kern_descrip.c        Sun Nov 23 00:12:27 2014        
(r274904)
@@ -2571,9 +2571,7 @@ fgetvp_rights(struct thread *td, int fd,
        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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to