diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-11-07 09:06:03 +0100 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2023-11-11 17:31:19 +0000 |
commit | fb47796cd6069be0075258b03b94bac09571825c (patch) | |
tree | 84da302877d4192dfa6113cfa68d786496ae324b | |
parent | 8265b39f0c2563b57a610355c9ee9ede5381f013 (diff) | |
download | iproute2-next-fb47796cd6069be0075258b03b94bac09571825c.tar.gz |
devlink: do conditional new line print in pr_out_port_handle_end()
Instead of printing out new line unconditionally, use __pr_out_newline()
to print it only when needed avoiding double prints.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r-- | devlink/devlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c index b711e92ca..90f6f8ff9 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2976,7 +2976,7 @@ static void pr_out_port_handle_end(struct dl *dl) if (dl->json_output) close_json_object(); else - pr_out("\n"); + __pr_out_newline(); } static void pr_out_region_chunk_start(struct dl *dl, uint64_t addr) |