svn commit: r273344 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Mon Oct 20 21:57:25 UTC 2014
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)
More information about the svn-src-head
mailing list