]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: bpf: fix extra newline in JSON output
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 9 Feb 2024 20:56:43 +0000 (12:56 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Sat, 10 Feb 2024 17:48:55 +0000 (09:48 -0800)
Don't print newline at end of bpf if in JSON mode.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/m_bpf.c

index 4eadcb6daac4029a9ab2150fdf9c38ea14fac49b..da50c05e15297dfbd81329e745c473654da76e1f 100644 (file)
@@ -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;
 }