git: 838c1fa88d71 - stable/13 - fork_norfproc(): style

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 23 Aug 2022 00:29:42 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=838c1fa88d71b61de86e37eac0b193a5eed21abe

commit 838c1fa88d71b61de86e37eac0b193a5eed21abe
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-08-12 00:37:55 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-08-22 13:37:09 +0000

    fork_norfproc(): style
    
    (cherry picked from commit bd76586bb705d62549f6df7ae8cebf7db252db63)
---
 sys/kern/kern_fork.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 90fc027b2979..ae716fb056a6 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -306,8 +306,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"));
@@ -339,15 +339,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(td->td_proc->p_fd, false, NULL);
 		pdescfree(td);
@@ -359,7 +360,7 @@ again:
 	/*
 	 * Unshare file descriptors (from parent).
 	 */
-	if (flags & RFFDG) {
+	if ((flags & RFFDG) != 0) {
 		fdunshare(td);
 		pdunshare(td);
 	}