Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753058AbdDLFkD (ORCPT ); Wed, 12 Apr 2017 01:40:03 -0400 Received: from terminus.zytor.com ([65.50.211.136]:37741 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbdDLFj7 (ORCPT ); Wed, 12 Apr 2017 01:39:59 -0400 Date: Tue, 11 Apr 2017 22:36:24 -0700 From: tip-bot for Taeung Song Message-ID: Cc: peterz@infradead.org, namhyung@kernel.org, mingo@kernel.org, tglx@linutronix.de, acme@redhat.com, jolsa@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org, treeze.taeung@gmail.com, wangnan0@huawei.com, hpa@zytor.com Reply-To: jolsa@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org, ak@linux.intel.com, treeze.taeung@gmail.com, wangnan0@huawei.com, hpa@zytor.com, namhyung@kernel.org, peterz@infradead.org, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1491575061-704-5-git-send-email-treeze.taeung@gmail.com> References: <1491575061-704-5-git-send-email-treeze.taeung@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf pmu: Refactor wordwrap() with ltrim() Git-Commit-ID: aa4beb10a94358bf2474d1fc9c4ccde34660cc9d 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 Content-Length: 1205 Lines: 36 Commit-ID: aa4beb10a94358bf2474d1fc9c4ccde34660cc9d Gitweb: http://git.kernel.org/tip/aa4beb10a94358bf2474d1fc9c4ccde34660cc9d Author: Taeung Song AuthorDate: Fri, 7 Apr 2017 23:24:20 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 11 Apr 2017 08:45:10 -0300 perf pmu: Refactor wordwrap() with ltrim() Signed-off-by: Taeung Song Cc: Andi Kleen Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1491575061-704-5-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 362051e..11c7525 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -1148,8 +1148,7 @@ static void wordwrap(char *s, int start, int max, int corr) break; s += wlen; column += n; - while (isspace(*s)) - s++; + s = ltrim(s); } }