From: Stephen Hemminger Date: Fri, 9 Feb 2024 20:56:43 +0000 (-0800) Subject: tc: bpf: fix extra newline in JSON output X-Git-Tag: v6.8.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46031294e3e20356b0bb64f1dfe8c6c57e4d8764;p=thirdparty%2Fiproute2.git tc: bpf: fix extra newline in JSON output Don't print newline at end of bpf if in JSON mode. Signed-off-by: Stephen Hemminger --- diff --git a/tc/m_bpf.c b/tc/m_bpf.c index 4eadcb6d..da50c05e 100644 --- a/tc/m_bpf.c +++ b/tc/m_bpf.c @@ -204,7 +204,7 @@ static int bpf_print_opt(struct action_util *au, FILE *f, struct rtattr *arg) } } - fprintf(f, "\n "); + print_string(PRINT_FP, NULL, "%s", "\n "); return 0; }