git: 0282f87530b3 - main - ktrace: Simplify ae6ac587, drop the sa var declaration

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Tue, 16 May 2023 19:46:44 UTC
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=0282f87530b33ebba890794b07f75a2874357e3a

commit 0282f87530b33ebba890794b07f75a2874357e3a
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-05-16 19:46:26 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-05-16 19:46:26 +0000

    ktrace: Simplify ae6ac587, drop the sa var declaration
    
    Suggested by:           kib
    MFC after:              5 days
---
 sys/kern/kern_fork.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index ca2357edbe36..f981747aaf70 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1125,9 +1125,6 @@ fork_exit(void (*callout)(void *, struct trapframe *), void *arg,
 void
 fork_return(struct thread *td, struct trapframe *frame)
 {
-#ifdef KTRACE
-	struct syscall_args *sa;
-#endif
 	struct proc *p;
 
 	p = td->td_proc;
@@ -1170,10 +1167,8 @@ fork_return(struct thread *td, struct trapframe *frame)
 	userret(td, frame);
 
 #ifdef KTRACE
-	if (KTRPOINT(td, KTR_SYSRET)) {
-		sa = &td->td_sa;
-		ktrsysret(sa->code, 0, 0);
-	}
+	if (KTRPOINT(td, KTR_SYSRET))
+		ktrsysret(td->td_sa.code, 0, 0);
 #endif
 }