Re: [PATCH] perf tools: Remove redundant variable assignment

From: Arnaldo Carvalho de Melo
Date: Mon Nov 11 2024 - 12:53:40 EST


On Mon, Nov 11, 2024 at 04:27:13PM +0800, Luo Yifan wrote:
> This patch makes a minor change that removes the redundant assignment
> to the variable ret, simplifying the code.

Thanks, applied to perf-tools-next,

- Arnaldo

> Signed-off-by: Luo Yifan <luoyifan@xxxxxxxxxxxxxxxxxxxx>
> ---
> tools/perf/jvmti/jvmti_agent.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tools/perf/jvmti/jvmti_agent.c b/tools/perf/jvmti/jvmti_agent.c
> index 526dcaf9f..751219143 100644
> --- a/tools/perf/jvmti/jvmti_agent.c
> +++ b/tools/perf/jvmti/jvmti_agent.c
> @@ -408,9 +408,7 @@ jvmti_write_code(void *agent, char const *sym,
>
> funlockfile(fp);
>
> - ret = 0;
> -
> - return ret;
> + return 0;
> }
>
> int
> --
> 2.27.0
>
>