summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browser.c
diff options
context:
space:
mode:
authorTaeung Song <treeze.taeung@gmail.com>2017-04-07 16:24:19 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-11 13:45:10 +0200
commite21600fd41106f7a0ca124cec2404b2b3562768d (patch)
tree91f7b324b8f959e9fb7ade8dc54acd5bf0004fdf /tools/perf/ui/browser.c
parentperf stat: Refactor the code to strip csv output with ltrim() (diff)
downloadlinux-e21600fd41106f7a0ca124cec2404b2b3562768d.tar.xz
linux-e21600fd41106f7a0ca124cec2404b2b3562768d.zip
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@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.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@redhat.com>
Diffstat (limited to 'tools/perf/ui/browser.c')
-rw-r--r--tools/perf/ui/browser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index 3eb3edb307a4..9e47ccbe07f1 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;