Eric Blake <ebl...@redhat.com> writes: > On 4/15/20 3:30 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster <arm...@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 <ebl...@redhat.com> Thanks!