lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e21600fd41106f7a0ca124cec2404b2b3562768d@git.kernel.org>
Date:   Tue, 11 Apr 2017 22:35:55 -0700
From:   tip-bot for Taeung Song <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     namhyung@...nel.org, tglx@...utronix.de, acme@...hat.com,
        jolsa@...nel.org, peterz@...radead.org, hpa@...or.com,
        linux-kernel@...r.kernel.org, treeze.taeung@...il.com,
        wangnan0@...wei.com, mhiramat@...nel.org, mingo@...nel.org
Subject: [tip:perf/core] perf ui browser: Refactor the code to parse color
 configs with ltrim()

Commit-ID:  e21600fd41106f7a0ca124cec2404b2b3562768d
Gitweb:     http://git.kernel.org/tip/e21600fd41106f7a0ca124cec2404b2b3562768d
Author:     Taeung Song <treeze.taeung@...il.com>
AuthorDate: Fri, 7 Apr 2017 23:24:19 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 11 Apr 2017 08:45:10 -0300

perf ui browser: Refactor the code to parse color configs with ltrim()

When parsing {fore, back} ground color configs, use ltrim() instead of
just while loop and isspace().

Signed-off-by: Taeung Song <treeze.taeung@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/r/1491575061-704-4-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/ui/browser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index 3eb3edb..9e47ccb 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -579,7 +579,7 @@ static int ui_browser__color_config(const char *var, const char *value,
 			break;
 
 		*bg = '\0';
-		while (isspace(*++bg));
+		bg = ltrim(++bg);
 		ui_browser__colorsets[i].bg = bg;
 		ui_browser__colorsets[i].fg = fg;
 		return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ