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>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <bpf/libbpf.h>
|
||||
|
||||
/* FIXME: For the HE_COLORSET */
|
||||
@@ -1495,7 +1496,7 @@ static int symbol__parse_objdump_line(struct symbol *sym, FILE *file,
|
||||
return -1;
|
||||
|
||||
line_ip = -1;
|
||||
parsed_line = rtrim(line);
|
||||
parsed_line = strim(line);
|
||||
|
||||
/* /filename:linenr ? Save line number and ignore. */
|
||||
if (regexec(&file_lineno, parsed_line, 2, match, 0) == 0) {
|
||||
|
Reference in New Issue
Block a user