Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618839
| From | Taeung Song <treeze.taeung@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] perf ui browser: Refactor the code to parse color configs with ltrim() |
| Date | 2017-04-07 16:30 +0200 |
| Message-ID | <ttD3I-8io-25@gated-at.bofh.it> (permalink) |
| References | <ttD3H-8io-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When parsing {fore, back} ground color configs,
use ltrim() instead of just while loop and isspace().
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Taeung Song <treeze.taeung@gmail.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;
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] Refactoring with ltrim() and rtrim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-07 16:30 +0200
[PATCH 2/5] perf stat: Refactor the code to strip csv output with ltrim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-07 16:30 +0200
Re: [PATCH 2/5] perf stat: Refactor the code to strip csv output with ltrim() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-07 17:10 +0200
Re: [PATCH 2/5] perf stat: Refactor the code to strip csv output with ltrim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-08 01:50 +0200
[PATCH 3/5] perf ui browser: Refactor the code to parse color configs with ltrim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-07 16:30 +0200
[PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-07 16:30 +0200
Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-07 17:10 +0200
Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-07 20:10 +0200
Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-07 17:10 +0200
Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() Taeung Song <treeze.taeung@gmail.com> - 2017-04-08 02:20 +0200
Re: [PATCH 1/5] perf annotate: Refactor the code to parse disassemble lines with {l,r}trim() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-07 17:10 +0200
csiph-web