From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 22:01:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B55FEA1; Tue, 13 Nov 2012 22:01:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 30C138FC0C; Tue, 13 Nov 2012 22:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qADM1QtH030227; Tue, 13 Nov 2012 22:01:26 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qADM1QjH030226; Tue, 13 Nov 2012 22:01:26 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201211132201.qADM1QjH030226@svn.freebsd.org> From: Mateusz Guzik Date: Tue, 13 Nov 2012 22:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243007 - 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.14 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: Tue, 13 Nov 2012 22:01:26 -0000 Author: mjg Date: Tue Nov 13 22:01:25 2012 New Revision: 243007 URL: http://svnweb.freebsd.org/changeset/base/243007 Log: enterpgrp: get rid of pgrp2 variable and use KASSERT directly on pgfind result. pgrp2 was used only for debugging, but pgrp2 = pgfind(..) was present in compiled code even for kernels without INVARIANTS Approved by: trasz (mentor) MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Nov 13 21:20:30 2012 (r243006) +++ head/sys/kern/kern_proc.c Tue Nov 13 22:01:25 2012 (r243007) @@ -421,17 +421,13 @@ enterpgrp(p, pgid, pgrp, sess) struct pgrp *pgrp; struct session *sess; { - struct pgrp *pgrp2; sx_assert(&proctree_lock, SX_XLOCKED); KASSERT(pgrp != NULL, ("enterpgrp: pgrp == NULL")); KASSERT(p->p_pid == pgid, ("enterpgrp: new pgrp and pid != pgid")); - - pgrp2 = pgfind(pgid); - - KASSERT(pgrp2 == NULL, + KASSERT(pgfind(pgid) == NULL, ("enterpgrp: pgrp with pgid exists")); KASSERT(!SESS_LEADER(p), ("enterpgrp: session leader attempted setpgrp"));