From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759163AbcBYFo4 (ORCPT ); Thu, 25 Feb 2016 00:44:56 -0500 Received: from torg.zytor.com ([198.137.202.12]:53252 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750948AbcBYFoy (ORCPT ); Thu, 25 Feb 2016 00:44:54 -0500 Date: Wed, 24 Feb 2016 21:44:37 -0800 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: acme@redhat.com, mingo@kernel.org, adrian.hunter@intel.com, tglx@linutronix.de, namhyung@kernel.org, jolsa@kernel.org, wangnan0@huawei.com, hpa@zytor.com, linux-kernel@vger.kernel.org Reply-To: jolsa@kernel.org, namhyung@kernel.org, tglx@linutronix.de, mingo@kernel.org, adrian.hunter@intel.com, acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com, wangnan0@huawei.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf help: No need to use strbuf_remove() Git-Commit-ID: d1130686f463e6feff19196475c3c15b1923c525 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d1130686f463e6feff19196475c3c15b1923c525 Gitweb: http://git.kernel.org/tip/d1130686f463e6feff19196475c3c15b1923c525 Author: Arnaldo Carvalho de Melo AuthorDate: Tue, 23 Feb 2016 16:18:37 -0300 Committer: Arnaldo Carvalho de Melo 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 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 --- 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,