Messages in this thread |  | | Date | Wed, 4 Dec 2013 09:59:04 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH v4 2/3] perf diff: color the Ratio column |
| |
Em Wed, Dec 04, 2013 at 03:40:25PM +0530, Ramkumar Ramachandra escreveu: > Arnaldo Carvalho de Melo wrote: > > static inline percent_color_snprintf(...) > > { > > return value_color_snprintf(...); > > } > > The issue with this suggestion is that the prototype of > percent_color_snprintf() is: > > int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...) > > So, I can only pass value_color_snprintf() a va_list, making its prototype: > > int value_color_snprintf(char *bf, size_t size, const char *fmt, va_list args) > > Is this worth the minor rename?
That is ok, I'd say. Or if that would be a problem one could consider using a macro, perhaps.
> On a related note, does percent_color_snprintf() need to be a variadic > function? It only seems to process one percent value.
I think that there are places where it is passed as a pointer that expects it to have that prototype, this is from memory, so please check.
- Arnaldo
|  |