o Uniformly copy uap arguments into local variables before grabbing

giant, and make whitespace more consistent around giant-frobbing.
This commit is contained in:
Robert Watson 2001-12-02 15:22:56 +00:00
parent f605567c24
commit 4f5a4612d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87220

View file

@ -642,7 +642,6 @@ setgid(td, uap)
int error;
gid = uap->gid;
mtx_lock(&Giant);
error = 0;
oldcred = p->p_ucred;
@ -773,8 +772,8 @@ setgroups(td, uap)
u_int ngrp;
int error;
mtx_lock(&Giant);
ngrp = uap->gidsetsize;
mtx_lock(&Giant);
oldcred = p->p_ucred;
if ((error = suser_xxx(oldcred, NULL, PRISON_ROOT)) != 0)
goto done2;
@ -1007,7 +1006,6 @@ setresgid(td, uap)
egid = uap->egid;
rgid = uap->rgid;
sgid = uap->sgid;
mtx_lock(&Giant);
oldcred = p->p_ucred;
if (((rgid != (gid_t)-1 && rgid != oldcred->cr_rgid &&