Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnaldo Carvalho de Melo and committed by
Ingo Molnar
39e6dd73 64f1607f

+1 -1
+1 -1
tools/perf/builtin-record.c
··· 219 219 snprintf(filename, sizeof(filename), "/proc/%d/status", pid); 220 220 221 221 fp = fopen(filename, "r"); 222 - if (fd == NULL) { 222 + if (fp == NULL) { 223 223 /* 224 224 * We raced with a task exiting - just return: 225 225 */