Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Nov 2014 00:12:28 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274904 - head/sys/kern
Message-ID:  <201411230012.sAN0CSn9092785@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411230012.sAN0CSn9092785>