From: Arnaldo Carvalho de Melo Date: Fri, 14 Aug 2009 18:26:32 +0000 (-0300) Subject: perf record: Fix typo in pid_synthesize_comm_event X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39e6dd73502f64e2ae3236b304e160ae30de9384;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra LKML-Reference: <20090814182632.GF3490@ghostprotocols.net> Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 3d051b9cf25..89a5ddcd1de 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) 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: */