[PATCH 1/2] perf header: Fix a typo on evsel

Namhyung Kim
2012-09-06T02:18:16Z

From: Namhyung Kim <namhyung.kim@lge.com>

For checking return value of the strdup, 'event' should be 'evsel'.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/header.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 06ecd577d1b8..eb7a8da2f4f5 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2512,7 +2512,7 @@ static int perf_evsel__set_tracepoint_name(struct perf_evsel *evsel,

snprintf(bf, sizeof(bf), "%s:%s", event->system, event->name);
evsel->name = strdup(bf);
- if (event->name == NULL)
+ if (evsel->name == NULL)
return -1;

evsel->tp_format = event;
--
1.7.11.4