[PATCH tip 1/1] perf record: Fix typo in pid_synthesize_comm_event

Arnaldo Carvalho de Melo
2009-08-14T18:26:44Z

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...

Reported-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index e67c4fa..65b4115 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -201,7 +201,7 @@ static pid_t pid_synthesize_comm_event(pid_t pid, int full)
snprintf(filename, sizeof(filename), "/proc/%d/status", pid);

fp = fopen(filename, "r");
- if (fd == NULL) {
+ if (fp == NULL) {
/*
* We raced with a task exiting - just return:
*/
--
1.6.2.5