lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170124074746.93a88c7163c0e55e42cc84c8@kernel.org>
Date:   Tue, 24 Jan 2017 07:47:46 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        He Kuang <hekuang@...wei.com>, Ingo Molnar <mingo@...hat.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Milian Wolff <milian.wolff@...b.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>,
        Wang Nan <wangnan0@...wei.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/4] perf probe: Delete an unnecessary assignment in
 try_to_find_absolute_address()

On Mon, 23 Jan 2017 16:24:06 +0100
SF Markus Elfring <elfring@...rs.sourceforge.net> wrote:

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Mon, 23 Jan 2017 15:10:19 +0100
> 
> Remove an error code assignment which is redundant in an if branch for
> the handling of a memory allocation failure because the same value was set
> for the local variable "err" before.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>


This looks good to me :)

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thanks!

> ---
>  tools/perf/util/probe-event.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 6c7508337fe8..5a34c93b818a 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -2956,10 +2956,9 @@ static int try_to_find_absolute_address(struct perf_probe_event *pev,
>  
>  	tev->nargs = pev->nargs;
>  	tev->args = zalloc(sizeof(struct probe_trace_arg) * tev->nargs);
> -	if (!tev->args) {
> -		err = -ENOMEM;
> +	if (!tev->args)
>  		goto errout;
> -	}
> +
>  	for (i = 0; i < tev->nargs; i++)
>  		copy_to_probe_trace_arg(&tev->args[i], &pev->args[i]);
>  
> -- 
> 2.11.0
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ