]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - misc/ss.c
ss: fix end-of-line printing in misc/ss.c
[mirror_iproute2.git] / misc / ss.c
index c58e5c4d9cc1812bfa3f32ee2bbaba5d2a00bdb1..95f1d37a4cf37f5d8f208b18f05e1660d0acbe27 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1290,6 +1290,11 @@ static void render(void)
 
                token = buf_token_next(token);
        }
+       /* Deal with final end-of-line when the last non-empty field printed
+        * is not the last field.
+        */
+       if (line_started)
+               printf("\n");
 
        buf_free_all();
        current_field = columns;