All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [PATCH for-5.1 2/5] qobject: Factor out helper json_pretty_newline()
Date: Wed, 15 Apr 2020 16:46:41 +0200	[thread overview]
Message-ID: <87lfmwg626.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <344e1038-827a-7dea-7e73-b83b899673ed@redhat.com> (Eric Blake's message of "Wed, 15 Apr 2020 07:28:13 -0500")

Eric Blake <eblake@redhat.com> writes:

> On 4/15/20 3:30 AM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>   qobject/qjson.c | 40 ++++++++++++++++------------------------
>>   1 file changed, 16 insertions(+), 24 deletions(-)
>>
>> diff --git a/qobject/qjson.c b/qobject/qjson.c
>> index db36101f3b..f3c62711b9 100644
>> --- a/qobject/qjson.c
>> +++ b/qobject/qjson.c
>> @@ -159,21 +159,28 @@ typedef struct ToJsonIterState
>>     static void to_json(const QObject *obj, QString *str, int
>> pretty, int indent);
>>   +static void json_pretty_newline(QString *str, bool pretty, int
>> indent)
>> +{
>> +    int i;
>> +
>> +    if (pretty) {
>> +        qstring_append(str, "\n");
>> +        for (i = 0 ; i < indent ; i++) {
>
> Why are you keeping the spaces before ; ?  Yes, I know they were
> copied-and-pasted from the old code, but as long as you are
> refactoring, fixing the style is worthwhile.

Makes sense.

> Otherwise,
> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks!



  reply	other threads:[~2020-04-15 14:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  8:30 [PATCH for-5.1 0/5] qobject: Minor spring cleaning Markus Armbruster
2020-04-15  8:30 ` [PATCH for-5.1 1/5] qobject: Clean up QLIST_FOREACH_ENTRY() Markus Armbruster
2020-04-15 12:25   ` Eric Blake
2020-04-15  8:30 ` [PATCH for-5.1 2/5] qobject: Factor out helper json_pretty_newline() Markus Armbruster
2020-04-15 12:28   ` Eric Blake
2020-04-15 14:46     ` Markus Armbruster [this message]
2020-04-15  8:30 ` [PATCH for-5.1 3/5] qobject: Eliminate qlist_iter(), use QLIST_FOREACH_ENTRY() instead Markus Armbruster
2020-04-15 12:31   ` Eric Blake
2020-04-15  8:30 ` [PATCH for-5.1 4/5] qobject: Eliminate qdict_iter(), use qdict_first(), qdict_next() Markus Armbruster
2020-04-15 12:34   ` Eric Blake
2020-04-15 14:48     ` Markus Armbruster
2020-04-15  8:30 ` [PATCH for-5.1 5/5] qemu-option: Clean up after the previous commit Markus Armbruster
2020-04-15 12:35   ` Eric Blake
2020-04-29  7:46 ` [PATCH for-5.1 0/5] qobject: Minor spring cleaning Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfmwg626.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.