perf help: No need to use strbuf_remove()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Feb 2016 19:18:37 +0000 (16:18 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Feb 2016 19:18:37 +0000 (16:18 -0300)
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>
tools/perf/builtin-help.c

index 96c1a4cfbbbf6b1f639d91d562c55b09da5c7e6f..f4dd2b48f90fcd6d42fe7981c97de72a41bf6154 100644 (file)
@@ -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,