Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1599240 > unrolled thread

[PATCH] perf: fix typo in function switch_data_file

Started bychangbin.du@intel.com
First post2017-03-13 12:50 +0100
Last post2017-03-13 16:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf: fix typo in function switch_data_file changbin.du@intel.com - 2017-03-13 12:50 +0100
    Re: [PATCH] perf: fix typo in function switch_data_file Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-13 16:10 +0100

#1599240 — [PATCH] perf: fix typo in function switch_data_file

Fromchangbin.du@intel.com
Date2017-03-13 12:50 +0100
Subject[PATCH] perf: fix typo in function switch_data_file
Message-ID<tkwE9-8nq-9@gated-at.bofh.it>
From: Changbin Du <changbin.du@intel.com>

Should clear buf abs_path, not options.

Signed-off-by: Changbin Du <changbin.du@intel.com>
---
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index a6dae80..6fafe02 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2350,7 +2350,7 @@ static int switch_data_file(void)
 		return ret;
 
 	memset(options, 0, sizeof(options));
-	memset(options, 0, sizeof(abs_path));
+	memset(abs_path, 0, sizeof(abs_path));
 
 	while ((dent = readdir(pwd_dir))) {
 		char path[PATH_MAX];
-- 
2.7.4

[toc] | [next] | [standalone]


#1599494

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-03-13 16:10 +0100
Message-ID<tkzLI-2ig-5@gated-at.bofh.it>
In reply to#1599240
Em Mon, Mar 13, 2017 at 07:46:52PM +0800, changbin.du@intel.com escreveu:
> From: Changbin Du <changbin.du@intel.com>
> 
> Should clear buf abs_path, not options.

Thanks, applied.

- Arnaldo
 
> Signed-off-by: Changbin Du <changbin.du@intel.com>
> ---
>  tools/perf/ui/browsers/hists.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index a6dae80..6fafe02 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -2350,7 +2350,7 @@ static int switch_data_file(void)
>  		return ret;
>  
>  	memset(options, 0, sizeof(options));
> -	memset(options, 0, sizeof(abs_path));
> +	memset(abs_path, 0, sizeof(abs_path));
>  
>  	while ((dent = readdir(pwd_dir))) {
>  		char path[PATH_MAX];
> -- 
> 2.7.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web