aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-help.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-02-23 16:18:37 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-23 16:18:37 -0300
commitd1130686f463e6feff19196475c3c15b1923c525 (patch)
tree1c8e61b8d62756f5642da82f9dd529f7e308d272 /tools/perf/builtin-help.c
parentperf tools: Dont stop PMU parsing on alias parse error (diff)
downloadlinux-dev-d1130686f463e6feff19196475c3c15b1923c525.tar.xz
linux-dev-d1130686f463e6feff19196475c3c15b1923c525.zip
perf help: No need to use strbuf_remove()
It is the only user of this function, just use the strlen() to skip the prefix. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-blao710l5cd5hmwrhy51ftgq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-help.c')
-rw-r--r--tools/perf/builtin-help.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index 96c1a4cfbbbf..f4dd2b48f90f 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -86,8 +86,7 @@ static int check_emacsclient_version(void)
return -1;
}
- strbuf_remove(&buffer, 0, strlen("emacsclient"));
- version = atoi(buffer.buf);
+ version = atoi(buffer.buf + strlen("emacsclient"));
if (version < 22) {
fprintf(stderr,