mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:perf/core] perf help: No need to use strbuf_remove()
@ 2016-02-25  5:44 tip-bot for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2016-02-25  5:44 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, mingo, adrian.hunter, tglx, namhyung, jolsa, wangnan0, hpa,
	linux-kernel

Commit-ID:  d1130686f463e6feff19196475c3c15b1923c525
Gitweb:     http://git.kernel.org/tip/d1130686f463e6feff19196475c3c15b1923c525
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Tue, 23 Feb 2016 16:18:37 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.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@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 | 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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-25  5:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25  5:44 [tip:perf/core] perf help: No need to use strbuf_remove() tip-bot for Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome