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
This commit is contained in:
parent
f09b8c49d8
commit
4419a8a88c
@ -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"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user