On Fri, 25 Dec 2020 20:10:15 +0100
Oliver Hartkopp <socket...@hartkopp.net> wrote:

> @@ -315,10 +320,12 @@ static void can_print_opt(struct link_util *lu, FILE 
> *f, struct rtattr *tb[])
>                         "restart_ms",
>                         "restart-ms %d ",
>                         *restart_ms);
>       }
>  
> +     fprintf(f, "\n        ");
> +
That will print in both JSON and non-JSON mode. You don't want to do that.
It also will break in single-line mode.

The iplink_can code has way too many if (is_json_context()) ...
which can lead to differences in output.

Ideally it should have no instances of "fprintf(f, ..."

Reply via email to