diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-06-26 16:42:03 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-06-26 16:42:03 +0200 |
commit | 328584804edc950fb4608c9a38e396ac71ef22b6 (patch) | |
tree | ea398fb09a36ea3af7f213ccbb2179b1889985d5 /tools/perf/util/pmu.c | |
parent | perf report: Use skip_spaces() (diff) | |
download | linux-328584804edc950fb4608c9a38e396ac71ef22b6.tar.xz linux-328584804edc950fb4608c9a38e396ac71ef22b6.zip |
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>
Diffstat (limited to 'tools/perf/util/pmu.c')
-rw-r--r-- | tools/perf/util/pmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index faa8eb231e1b..38dc0c6e28b8 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/list.h> #include <linux/compiler.h> +#include <linux/string.h> #include <sys/types.h> #include <errno.h> #include <fcntl.h> @@ -1339,7 +1340,7 @@ static void wordwrap(char *s, int start, int max, int corr) break; s += wlen; column += n; - s = ltrim(s); + s = skip_spaces(s); } } |