perf tools: Ditch rtrim(), use skip_spaces() to get closer to the kernel
No change in behaviour, just using the same kernel idiom for such operation. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: André Goddard Rosa <andre.goddard@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-a85lkptkt0ru40irpga8yf54@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -459,7 +459,7 @@ static void perf_gtk__add_hierarchy_entries(struct hists *hists,
|
||||
advance_hpp(hpp, ret + 2);
|
||||
}
|
||||
|
||||
gtk_tree_store_set(store, &iter, col_idx, ltrim(rtrim(bf)), -1);
|
||||
gtk_tree_store_set(store, &iter, col_idx, trim(bf), -1);
|
||||
|
||||
if (!he->leaf) {
|
||||
hpp->buf = bf;
|
||||
@@ -555,7 +555,7 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists,
|
||||
first_col = false;
|
||||
|
||||
fmt->header(fmt, &hpp, hists, 0, NULL);
|
||||
strcat(buf, ltrim(rtrim(hpp.buf)));
|
||||
strcat(buf, trim(hpp.buf));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user