Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2014 21:57:24 +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: r273344 - head/sys/kern
Message-ID:  <201410202157.s9KLvO4S026574@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Mon Oct 20 21:57:24 2014
New Revision: 273344
URL: https://svnweb.freebsd.org/changeset/base/273344

Log:
  filedesc: plug 2 write-only variables
  
  Reported by: Coverity
  CID: 1245745, 1245746

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Mon Oct 20 21:53:51 2014	(r273343)
+++ head/sys/kern/kern_descrip.c	Mon Oct 20 21:57:24 2014	(r273344)
@@ -3138,7 +3138,6 @@ export_vnode_to_sb(struct vnode *vp, int
 int
 kern_proc_filedesc_out(struct proc *p,  struct sbuf *sb, ssize_t maxlen)
 {
-	struct thread *td;
 	struct file *fp;
 	struct filedesc *fdp;
 	struct export_fd_buf *efbuf;
@@ -3146,7 +3145,6 @@ kern_proc_filedesc_out(struct proc *p,  
 	int error, i;
 	cap_rights_t rights;
 
-	td = curthread;
 	PROC_LOCK_ASSERT(p, MA_OWNED);
 
 	/* ktrace vnode */
@@ -3301,12 +3299,10 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE
 	struct kinfo_ofile *okif;
 	struct kinfo_file *kif;
 	struct filedesc *fdp;
-	struct thread *td;
 	int error, i, *name;
 	struct file *fp;
 	struct proc *p;
 
-	td = curthread;
 	name = (int *)arg1;
 	error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p);
 	if (error != 0)



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