mirror of
https://github.com/opnsense/src.git
synced 2026-07-14 19:51:17 -04:00
fork_norfproc(): style
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D36207
This commit is contained in:
parent
6b598e263b
commit
bd76586bb7
1 changed files with 5 additions and 4 deletions
|
|
@ -307,8 +307,8 @@ retry:
|
|||
static int
|
||||
fork_norfproc(struct thread *td, int flags)
|
||||
{
|
||||
int error;
|
||||
struct proc *p1;
|
||||
int error;
|
||||
|
||||
KASSERT((flags & RFPROC) == 0,
|
||||
("fork_norfproc called with RFPROC set"));
|
||||
|
|
@ -340,15 +340,16 @@ again:
|
|||
}
|
||||
|
||||
error = vm_forkproc(td, NULL, NULL, NULL, flags);
|
||||
if (error)
|
||||
if (error != 0)
|
||||
goto fail;
|
||||
|
||||
/*
|
||||
* Close all file descriptors.
|
||||
*/
|
||||
if (flags & RFCFDG) {
|
||||
if ((flags & RFCFDG) != 0) {
|
||||
struct filedesc *fdtmp;
|
||||
struct pwddesc *pdtmp;
|
||||
|
||||
pdtmp = pdinit(td->td_proc->p_pd, false);
|
||||
fdtmp = fdinit();
|
||||
pdescfree(td);
|
||||
|
|
@ -360,7 +361,7 @@ again:
|
|||
/*
|
||||
* Unshare file descriptors (from parent).
|
||||
*/
|
||||
if (flags & RFFDG) {
|
||||
if ((flags & RFFDG) != 0) {
|
||||
fdunshare(td);
|
||||
pdunshare(td);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue