Tidy up sys_umask a little bit
Consistently use saved fdp pointer as it cannot change. If it could change the code would be already incorrect. No functional changes.
This commit is contained in:
parent
a6ffc42f7a
commit
c3293b83c4
@ -4158,13 +4158,13 @@ sys_umask(td, uap)
|
||||
int newmask;
|
||||
} */ *uap;
|
||||
{
|
||||
register struct filedesc *fdp;
|
||||
struct filedesc *fdp;
|
||||
|
||||
FILEDESC_XLOCK(td->td_proc->p_fd);
|
||||
fdp = td->td_proc->p_fd;
|
||||
FILEDESC_XLOCK(fdp);
|
||||
td->td_retval[0] = fdp->fd_cmask;
|
||||
fdp->fd_cmask = uap->newmask & ALLPERMS;
|
||||
FILEDESC_XUNLOCK(td->td_proc->p_fd);
|
||||
FILEDESC_XUNLOCK(fdp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user