perf tools: Introduce trim function
To be used in cases for both sides trim. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Andreas Hollmann <hollmann@in.tum.de> Cc: David Ahern <dsahern@gmail.com> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1460013073-18444-1-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
d1d438a3b1
commit
7d6a7e7825
@@ -1607,9 +1607,8 @@ static int hists_browser__scnprintf_hierarchy_headers(struct hist_browser *brows
|
||||
|
||||
ret = fmt->header(fmt, &dummy_hpp, hists_to_evsel(hists));
|
||||
dummy_hpp.buf[ret] = '\0';
|
||||
rtrim(dummy_hpp.buf);
|
||||
|
||||
start = ltrim(dummy_hpp.buf);
|
||||
start = trim(dummy_hpp.buf);
|
||||
ret = strlen(start);
|
||||
|
||||
if (start != dummy_hpp.buf)
|
||||
|
Reference in New Issue
Block a user