Commit 39e6dd73 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

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: default avatarUlrich Drepper <drepper@redhat.com>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20090814182632.GF3490@ghostprotocols.net>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 64f1607f
...@@ -219,7 +219,7 @@ static pid_t pid_synthesize_comm_event(pid_t pid, int full) ...@@ -219,7 +219,7 @@ static pid_t pid_synthesize_comm_event(pid_t pid, int full)
snprintf(filename, sizeof(filename), "/proc/%d/status", pid); snprintf(filename, sizeof(filename), "/proc/%d/status", pid);
fp = fopen(filename, "r"); fp = fopen(filename, "r");
if (fd == NULL) { if (fp == NULL) {
/* /*
* We raced with a task exiting - just return: * We raced with a task exiting - just return:
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment