Peter Xu writes:
> Fix two places to use literal printf format when possible.
>
> Signed-off-by: Peter Xu
Reviewed-by: Markus Armbruster
On Mon, Mar 21, 2016 at 03:14:48PM -0600, Eric Blake wrote:
> On 03/09/2016 06:46 PM, Peter Xu wrote:
> >
> > Is this a grammar btw?
>
> Yes, C has an ugly grammar, because [] is just syntactic sugar for
> deferencing pointer addition with nicer operator precedence. Quoting
> C99 6.5.2.1:
>
> "
On 03/09/2016 06:46 PM, Peter Xu wrote:
> On Wed, Mar 09, 2016 at 03:14:03PM -0700, Eric Blake wrote:
>>> +func_fprintf(f, "%*s[%i]:%c", indentation * 4, "", i,
>>> + composite ? '\n' : ' ');
>>
>> [The nerd in me wants to point out that you could avoid the ternary by
>>
On Wed, Mar 09, 2016 at 03:14:03PM -0700, Eric Blake wrote:
> > +func_fprintf(f, "%*s[%i]:%c", indentation * 4, "", i,
> > + composite ? '\n' : ' ');
>
> [The nerd in me wants to point out that you could avoid the ternary by
> writing '"\n "[composite]', but that's too
On 03/08/2016 10:56 PM, Peter Xu wrote:
> Fix two places to use literal printf format when possible.
>
> Signed-off-by: Peter Xu
> ---
> block/qapi.c | 10 --
> 1 file changed, 4 insertions(+), 6 deletions(-)
Reviewed-by: Eric Blake
>
> diff --git a/block/qapi.c b/block/qapi.c
> inde
Fix two places to use literal printf format when possible.
Signed-off-by: Peter Xu
---
block/qapi.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index db2d3fb..c4c2115 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -619,9 +619,8 @@ s