[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180911110157.GF2630@orbyte.nwl.cc>
Date: Tue, 11 Sep 2018 13:01:57 +0200
From: Phil Sutter <phil@....cc>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCHv2 iproute2] bridge/mdb: fix missing new line when show
bridge mdb
Hi Hangbin,
On Tue, Sep 11, 2018 at 09:26:35AM +0800, Hangbin Liu wrote:
[...]
> + if (!is_json_context() && !show_stats)
> + print_string(PRINT_FP, NULL, "\n", NULL);
There is no need to check for !is_json_context() here. You give a type
of PRINT_FP which won't lead to output if JSON is active. For reference,
check print_color_string() in lib/json_print.c and _IS_JSON_CONTEXT
macro.
Cheers, Phil
Powered by blists - more mailing lists