Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Aug 2021 08:57:29 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1af0780b5f20 - main - linux(4): Move ff variable initialization from declaration.
Message-ID:  <202108120857.17C8vTZe064345@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=1af0780b5f20aaa2603bba221ff78ca22dd44bd2

commit 1af0780b5f20aaa2603bba221ff78ca22dd44bd2
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-08-12 08:57:16 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2021-08-12 08:57:16 +0000

    linux(4): Move ff variable initialization from declaration.
    
    Modern style(9) allows variables initialization where they are declared,
    but in this case initialization obfuscate the code.
    
    MFC after:              2 weeks
---
 sys/compat/linux/linux_fork.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c
index 72e753db60d4..f722e3c08482 100644
--- a/sys/compat/linux/linux_fork.c
+++ b/sys/compat/linux/linux_fork.c
@@ -134,13 +134,14 @@ static int
 linux_clone_proc(struct thread *td, struct l_clone_args *args)
 {
 	struct fork_req fr;
-	int error, ff = RFPROC | RFSTOPPED, f2;
+	int error, ff, f2;
 	struct proc *p2;
 	struct thread *td2;
 	int exit_signal;
 	struct linux_emuldata *em;
 
 	f2 = 0;
+	ff = RFPROC | RFSTOPPED;
 	if (LINUX_SIG_VALID(args->exit_signal)) {
 		exit_signal = linux_to_bsd_signal(args->exit_signal);
 	} else if (args->exit_signal != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108120857.17C8vTZe064345>