svn commit: r274904 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sun Nov 23 00:12:28 UTC 2014


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


More information about the svn-src-all mailing list