aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-08-14 14:26:32 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-15 05:59:06 -0400
commit39e6dd73502f64e2ae3236b304e160ae30de9384 (patch)
tree589138e23fc1dfb5c1a17d170bc3a4d02493d0fe /tools
parent64f1607ffbbc772685733ea63e6f7f4183df1b16 (diff)
perf record: Fix typo in pid_synthesize_comm_event
We were using 'fd' locally, but there was a global 'fd' too, so when converting from open to fopen the test made against fd should be made against 'fp', but since we have that global it didnt get discovered ... Reported-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20090814182632.GF3490@ghostprotocols.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-record.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3d051b9cf25f..89a5ddcd1ded 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -219,7 +219,7 @@ static pid_t pid_synthesize_comm_event(pid_t pid, int full)
219 snprintf(filename, sizeof(filename), "/proc/%d/status", pid); 219 snprintf(filename, sizeof(filename), "/proc/%d/status", pid);
220 220
221 fp = fopen(filename, "r"); 221 fp = fopen(filename, "r");
222 if (fd == NULL) { 222 if (fp == NULL) {
223 /* 223 /*
224 * We raced with a task exiting - just return: 224 * We raced with a task exiting - just return:
225 */ 225 */