From owner-svn-src-head@FreeBSD.ORG Mon Oct 20 21:57:25 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 211DC6CB; Mon, 20 Oct 2014 21:57:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D6D9FFA; Mon, 20 Oct 2014 21:57:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9KLvO1r026575; Mon, 20 Oct 2014 21:57:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9KLvO4S026574; Mon, 20 Oct 2014 21:57:24 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410202157.s9KLvO4S026574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 20 Oct 2014 21:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273344 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 21:57:25 -0000 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)