[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-blao710l5cd5hmwrhy51ftgq@git.kernel.org>
Date:	Wed, 24 Feb 2016 21:44:37 -0800
From:	tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, mingo@...nel.org, adrian.hunter@...el.com,
	tglx@...utronix.de, namhyung@...nel.org, jolsa@...nel.org,
	wangnan0@...wei.com, hpa@...or.com, linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf help: No need to use strbuf_remove()
Commit-ID:  d1130686f463e6feff19196475c3c15b1923c525
Gitweb:     http://git.kernel.org/tip/d1130686f463e6feff19196475c3c15b1923c525
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 23 Feb 2016 16:18:37 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 23 Feb 2016 16:18:37 -0300
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@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-blao710l5cd5hmwrhy51ftgq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-help.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index 96c1a4c..f4dd2b4 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,
Powered by blists - more mailing lists