public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Arnaldo Carvalho de Melo <acme@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, drepper@redhat.com,
	acme@redhat.com, hpa@zytor.com, mingo@redhat.com,
	peterz@infradead.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/urgent] perf record: Fix typo in pid_synthesize_comm_event
Date: Sat, 15 Aug 2009 10:06:52 GMT	[thread overview]
Message-ID: <tip-39e6dd73502f64e2ae3236b304e160ae30de9384@git.kernel.org> (raw)
In-Reply-To: <20090814182632.GF3490@ghostprotocols.net>

Commit-ID:  39e6dd73502f64e2ae3236b304e160ae30de9384
Gitweb:     http://git.kernel.org/tip/39e6dd73502f64e2ae3236b304e160ae30de9384
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Fri, 14 Aug 2009 15:26:32 -0300
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 15 Aug 2009 11:59:06 +0200

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>


---
 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 3d051b9..89a5ddc 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:
 		 */

      parent reply	other threads:[~2009-08-15 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 18:26 [PATCH tip 1/1] perf record: Fix typo in pid_synthesize_comm_event Arnaldo Carvalho de Melo
2009-08-14 19:07 ` Valdis.Kletnieks
2009-08-14 20:10   ` Arnaldo Carvalho de Melo
2009-08-15  9:56     ` Ingo Molnar
2009-08-15 10:06 ` tip-bot for Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-39e6dd73502f64e2ae3236b304e160ae30de9384@git.kernel.org \
    --to=acme@redhat.com \
    --cc=drepper@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox