diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-11-04 01:49:35 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-11-04 01:49:35 -0500 |
commit | 2a3ede8cb2ddee5885518e4232aca13056f9a6e0 (patch) | |
tree | 79b2b4e060a97b1e7c60d58549f8c97cb15db5dd /tools/perf/util | |
parent | 0e73453e172aaa38fd59fd4d3fc589e8fc9b9a70 (diff) | |
parent | 215432ed30393ed4a8f77db0a1fe34523c48cdba (diff) |
Merge branch 'perf/urgent' into perf/core to fix conflicts
Conflicts:
tools/perf/bench/numa.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/color.c | 11 | ||||
-rw-r--r-- | tools/perf/util/color.h | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c index 11e46da17bbb..66e44a5019d5 100644 --- a/tools/perf/util/color.c +++ b/tools/perf/util/color.c | |||
@@ -318,8 +318,15 @@ int percent_color_fprintf(FILE *fp, const char *fmt, double percent) | |||
318 | return r; | 318 | return r; |
319 | } | 319 | } |
320 | 320 | ||
321 | int percent_color_snprintf(char *bf, size_t size, const char *fmt, double percent) | 321 | int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...) |
322 | { | 322 | { |
323 | const char *color = get_percent_color(percent); | 323 | va_list args; |
324 | double percent; | ||
325 | const char *color; | ||
326 | |||
327 | va_start(args, fmt); | ||
328 | percent = va_arg(args, double); | ||
329 | va_end(args); | ||
330 | color = get_percent_color(percent); | ||
324 | return color_snprintf(bf, size, color, fmt, percent); | 331 | return color_snprintf(bf, size, color, fmt, percent); |
325 | } | 332 | } |
diff --git a/tools/perf/util/color.h b/tools/perf/util/color.h index dea082b79602..fced3840e99c 100644 --- a/tools/perf/util/color.h +++ b/tools/perf/util/color.h | |||
@@ -39,7 +39,7 @@ int color_fprintf(FILE *fp, const char *color, const char *fmt, ...); | |||
39 | int color_snprintf(char *bf, size_t size, const char *color, const char *fmt, ...); | 39 | int color_snprintf(char *bf, size_t size, const char *color, const char *fmt, ...); |
40 | int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...); | 40 | int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...); |
41 | int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf); | 41 | int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf); |
42 | int percent_color_snprintf(char *bf, size_t size, const char *fmt, double percent); | 42 | int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...); |
43 | int percent_color_fprintf(FILE *fp, const char *fmt, double percent); | 43 | int percent_color_fprintf(FILE *fp, const char *fmt, double percent); |
44 | const char *get_percent_color(double percent); | 44 | const char *get_percent_color(double percent); |
45 | 45 | ||