perf tools: Refactor the code to strip command name with {l,r}trim()
authorTaeung Song <treeze.taeung@gmail.com>
Fri, 7 Apr 2017 14:24:21 +0000 (23:24 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 11 Apr 2017 18:23:26 +0000 (15:23 -0300)
commitbdd97ca63faa374c98314d53c0bcaedb473c5a33
tree29eaa7a0943e806f6a8d7fb7435cf650a0057809
parentaa4beb10a94358bf2474d1fc9c4ccde34660cc9d
perf tools: Refactor the code to strip command name with {l,r}trim()

After reading command name from /proc/<pid>/status, use ltrim() and
rtrim() to strip command name, not using just while loop, isspace() and
etc.

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1491575061-704-6-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c