diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-06-26 17:13:13 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-02 03:50:33 +0200 |
commit | 13c230ab6e56c6ae3a968f01f4c6505b794cecad (patch) | |
tree | e29882ad70bfa5268376f411084c68c5c5d37229 /tools/perf/util/thread_map.c | |
parent | perf tools: Remove trim() implementation, use tools/lib's strim() (diff) | |
download | linux-13c230ab6e56c6ae3a968f01f4c6505b794cecad.tar.xz linux-13c230ab6e56c6ae3a968f01f4c6505b794cecad.zip |
perf tools: Ditch rtrim(), use strim() from tools/lib
Cleaning up a bit more tools/perf/util/ by using things we got from the
kernel and have in tools/lib/
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-7hluuoveryoicvkclshzjf1k@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | tools/perf/util/thread_map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c index 5d467d8ae9ab..281bf06f10f2 100644 --- a/tools/perf/util/thread_map.c +++ b/tools/perf/util/thread_map.c @@ -12,6 +12,7 @@ #include "strlist.h" #include <string.h> #include <api/fs/fs.h> +#include <linux/string.h> #include "asm/bug.h" #include "thread_map.h" #include "util.h" @@ -392,7 +393,7 @@ static int get_comm(char **comm, pid_t pid) * mark the end of the string. */ (*comm)[size] = 0; - rtrim(*comm); + strim(*comm); } free(path); |