Use print_nl() instead of print_string(), close the json object, then flush
the stream to flush the end of the JSON object ASAP.
Note that in print_mptcp_limit(), the flush should have been done before
closing the JSON object, but because there is only one object and the
closure was done just before exiting, there was no visual impact.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
}
}
+ print_nl();
close_json_object();
- print_string(PRINT_FP, NULL, "\n", NULL);
fflush(stdout);
return 0;
print_uint(PRINT_ANY, "subflows", "subflows %d ", val);
}
- print_string(PRINT_FP, NULL, "%s", "\n");
- fflush(stdout);
+
+ print_nl();
close_json_object();
+ fflush(stdout);
+
return 0;
}