From: Arnaldo Carvalho de Melo Date: Mon, 16 Mar 2015 20:46:57 +0000 (-0300) Subject: perf hists browser: Fix up some branch alignment X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=446fb96c4a72ba390fbdecf27a88eaa50ea179dc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Borislav Petkov Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian 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 --- 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, if (bi->from.sym != NULL && !bi->from.map->dso->annotate_warned && - asprintf(&options[nr_options], "Annotate %s", - bi->from.sym->name) > 0) + asprintf(&options[nr_options], "Annotate %s", bi->from.sym->name) > 0) { annotate_f = nr_options++; + } if (bi->to.sym != NULL && !bi->to.map->dso->annotate_warned && (bi->to.sym != bi->from.sym || bi->to.map->dso != bi->from.map->dso) && - asprintf(&options[nr_options], "Annotate %s", - bi->to.sym->name) > 0) + asprintf(&options[nr_options], "Annotate %s", bi->to.sym->name) > 0) { annotate_t = nr_options++; + } } else { if (browser->selection->sym != NULL && !browser->selection->map->dso->annotate_warned) { @@ -1643,8 +1643,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, if (notes->src && asprintf(&options[nr_options], "Annotate %s", - browser->selection->sym->name) > 0) + browser->selection->sym->name) > 0) { annotate = nr_options++; + } } } skip_annotation: