diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-12-16 06:43:47 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-12-16 06:43:47 -0500 |
commit | bbde588bfacb990542eed043d89c8591d4ae9211 (patch) | |
tree | 62ce715c9604177231f1d5e77e1a62d438061859 | |
parent | 68a7a771ad0e2959983729bf88cbc74a7014438f (diff) |
perf buildid-list: Fix error return for success
It was always returning -1 (255), confusing test scripts.
Reported-by: Han Pingtian <phan@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Han Pingtian <phan@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-buildid-list.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index 44a47e13bd67..c49837de7d3f 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c | |||
@@ -36,7 +36,6 @@ static const struct option options[] = { | |||
36 | 36 | ||
37 | static int __cmd_buildid_list(void) | 37 | static int __cmd_buildid_list(void) |
38 | { | 38 | { |
39 | int err = -1; | ||
40 | struct perf_session *session; | 39 | struct perf_session *session; |
41 | 40 | ||
42 | session = perf_session__new(input_name, O_RDONLY, force, false); | 41 | session = perf_session__new(input_name, O_RDONLY, force, false); |
@@ -49,7 +48,7 @@ static int __cmd_buildid_list(void) | |||
49 | perf_session__fprintf_dsos_buildid(session, stdout, with_hits); | 48 | perf_session__fprintf_dsos_buildid(session, stdout, with_hits); |
50 | 49 | ||
51 | perf_session__delete(session); | 50 | perf_session__delete(session); |
52 | return err; | 51 | return 0; |
53 | } | 52 | } |
54 | 53 | ||
55 | int cmd_buildid_list(int argc, const char **argv, const char *prefix __used) | 54 | int cmd_buildid_list(int argc, const char **argv, const char *prefix __used) |