* [patch iproute2] jsonw: Fix indentation of ending "}"
@ 2016-07-18 7:51 Jiri Pirko
2016-07-20 19:19 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2016-07-18 7:51 UTC (permalink / raw)
To: netdev; +Cc: stephen, Jiri Pirko
From: Jiri Pirko <jiri@mellanox.com>
Fix indentation of the very last "}" which is currently indented,
leaving the last 2 "}" like this:
\t}
\t}
EOF
So fix it to be:
\t}
}
EOF
Fixes fcc16c2287 ("provide common json output formatter")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
lib/json_writer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/json_writer.c b/lib/json_writer.c
index 2af16e1..4c0f646 100644
--- a/lib/json_writer.c
+++ b/lib/json_writer.c
@@ -33,7 +33,7 @@ struct json_writer {
static void jsonw_indent(json_writer_t *self)
{
unsigned i;
- for (i = 0; i <= self->depth; ++i)
+ for (i = 0; i < self->depth; ++i)
fputs(" ", self->out);
}
@@ -103,6 +103,7 @@ json_writer_t *jsonw_new(FILE *f)
self->pretty = false;
self->sep = '\0';
putc('{', self->out);
+ ++self->depth;
}
return self;
}
@@ -112,6 +113,7 @@ void jsonw_destroy(json_writer_t **self_p)
{
json_writer_t *self = *self_p;
+ --self->depth;
assert(self->depth == 0);
jsonw_eol(self);
fputs("}\n", self->out);
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch iproute2] jsonw: Fix indentation of ending "}"
2016-07-18 7:51 [patch iproute2] jsonw: Fix indentation of ending "}" Jiri Pirko
@ 2016-07-20 19:19 ` Stephen Hemminger
2016-07-21 9:38 ` Jiri Pirko
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2016-07-20 19:19 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, Jiri Pirko
On Mon, 18 Jul 2016 09:51:17 +0200
Jiri Pirko <jiri@resnulli.us> wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Fix indentation of the very last "}" which is currently indented,
> leaving the last 2 "}" like this:
> \t}
> \t}
> EOF
>
> So fix it to be:
> \t}
> }
> EOF
>
> Fixes fcc16c2287 ("provide common json output formatter")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
This no longer applies, put in change to json_writer for bridge formatting.
Is it still needed?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch iproute2] jsonw: Fix indentation of ending "}"
2016-07-20 19:19 ` Stephen Hemminger
@ 2016-07-21 9:38 ` Jiri Pirko
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2016-07-21 9:38 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, Jiri Pirko
Wed, Jul 20, 2016 at 09:19:24PM CEST, stephen@networkplumber.org wrote:
>On Mon, 18 Jul 2016 09:51:17 +0200
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>> From: Jiri Pirko <jiri@mellanox.com>
>>
>> Fix indentation of the very last "}" which is currently indented,
>> leaving the last 2 "}" like this:
>> \t}
>> \t}
>> EOF
>>
>> So fix it to be:
>> \t}
>> }
>> EOF
>>
>> Fixes fcc16c2287 ("provide common json output formatter")
>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>
>This no longer applies, put in change to json_writer for bridge formatting.
>Is it still needed?
Looks like this is fixed now in master. Please drop this. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-21 9:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 7:51 [patch iproute2] jsonw: Fix indentation of ending "}" Jiri Pirko
2016-07-20 19:19 ` Stephen Hemminger
2016-07-21 9:38 ` Jiri Pirko
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.