Skip to contentSkip to conversation

perf: fix typo in function switch_data_file

PATCH Applied [email protected] 3 participants 3 messages Mar 13, 2017 – Mar 15, 2017 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: fix typo in function switch_data_file

From: Changbin Du <[email protected]>

Should clear buf abs_path, not options.

---
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browsers/hists.c +1 -1
index a6dae80..6fafe02 100644
@@ -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];
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw

Em Mon, Mar 13, 2017 at 07:46:52PM +0800, [email protected] escreveu:

Quoted 3 lines

From: Changbin Du <[email protected]>

Should clear buf abs_path, not options.

Thanks, applied.

- Arnaldo

Quoted 20 lines
---
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browsers/hists.c +1 -1
index a6dae80..6fafe02 100644
@@ -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];
Signature · 1 line
2.7.4
#2 lore raw

[tip:perf/core] perf hists browser: Fix typo in function switch_data_file

In reply to [email protected]
perf hists browser: Fix typo in function switch_data_file
Commit-ID:  3ef5b4023c64c16c793a066a7a2ed6ea3767e0d7
Gitweb:     http://git.kernel.org/tip/3ef5b4023c64c16c793a066a7a2ed6ea3767e0d7
Author:     Changbin Du <[email protected]>
AuthorDate: Mon, 13 Mar 2017 19:46:52 +0800
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 13 Mar 2017 11:58:57 -0300

perf hists browser: Fix typo in function switch_data_file

Should clear buf 'abs_path', not 'options'.

Cc Feng Tang <[email protected]>
Cc Peter Zijlstra <[email protected]>
Fixes 341487ab561f ("perf hists browser: Add option for runtime switching perf data file")
---
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browsers/hists.c +1 -1
index fc4fb66..2dc82be 100644
@@ -2308,7 +2308,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];