From: Arnaldo Carvalho de Melo Date: Tue, 23 Feb 2016 19:18:37 +0000 (-0300) Subject: perf help: No need to use strbuf_remove() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1130686f463e6feff19196475c3c15b1923c525;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-blao710l5cd5hmwrhy51ftgq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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,