diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-16 16:46:57 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-16 16:46:57 -0400 |
commit | 446fb96c4a72ba390fbdecf27a88eaa50ea179dc (patch) | |
tree | a249a7f54b51a11b43e166937333fa3f0290f62b /tools/perf | |
parent | 0ba332f70a555548430ef3cf459b5240df0ffbd5 (diff) |
perf hists browser: Fix up some branch alignment
Those asprintf return checks should be aligned with the other
conditionals, fix it.
Also add {} blocks to further clarify.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
echo Link: http://lkml.kernel.org/n/tip-`ranpwd -l 24`@git.kernel.org
Link: http://lkml.kernel.org/n/tip-nqgs07jfphbkw67wja870d3r@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index f69371b7f49b..ebd9d3afe2d6 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -1623,17 +1623,17 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
1623 | 1623 | ||
1624 | if (bi->from.sym != NULL && | 1624 | if (bi->from.sym != NULL && |
1625 | !bi->from.map->dso->annotate_warned && | 1625 | !bi->from.map->dso->annotate_warned && |
1626 | asprintf(&options[nr_options], "Annotate %s", | 1626 | asprintf(&options[nr_options], "Annotate %s", bi->from.sym->name) > 0) { |
1627 | bi->from.sym->name) > 0) | ||
1628 | annotate_f = nr_options++; | 1627 | annotate_f = nr_options++; |
1628 | } | ||
1629 | 1629 | ||
1630 | if (bi->to.sym != NULL && | 1630 | if (bi->to.sym != NULL && |
1631 | !bi->to.map->dso->annotate_warned && | 1631 | !bi->to.map->dso->annotate_warned && |
1632 | (bi->to.sym != bi->from.sym || | 1632 | (bi->to.sym != bi->from.sym || |
1633 | bi->to.map->dso != bi->from.map->dso) && | 1633 | bi->to.map->dso != bi->from.map->dso) && |
1634 | asprintf(&options[nr_options], "Annotate %s", | 1634 | asprintf(&options[nr_options], "Annotate %s", bi->to.sym->name) > 0) { |
1635 | bi->to.sym->name) > 0) | ||
1636 | annotate_t = nr_options++; | 1635 | annotate_t = nr_options++; |
1636 | } | ||
1637 | } else { | 1637 | } else { |
1638 | if (browser->selection->sym != NULL && | 1638 | if (browser->selection->sym != NULL && |
1639 | !browser->selection->map->dso->annotate_warned) { | 1639 | !browser->selection->map->dso->annotate_warned) { |
@@ -1643,8 +1643,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
1643 | 1643 | ||
1644 | if (notes->src && | 1644 | if (notes->src && |
1645 | asprintf(&options[nr_options], "Annotate %s", | 1645 | asprintf(&options[nr_options], "Annotate %s", |
1646 | browser->selection->sym->name) > 0) | 1646 | browser->selection->sym->name) > 0) { |
1647 | annotate = nr_options++; | 1647 | annotate = nr_options++; |
1648 | } | ||
1648 | } | 1649 | } |
1649 | } | 1650 | } |
1650 | skip_annotation: | 1651 | skip_annotation: |