From: Sebastien GODARD Date: Sat, 26 Aug 2017 13:34:00 +0000 (+0200) Subject: Fix #163: 'iostat -y' json output includes an invalid token X-Git-Tag: v11.7.1~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1904c80b64fb95683ed09f4f9d66aa87820d196d;p=sysstat Fix #163: 'iostat -y' json output includes an invalid token Signed-off-by: Sebastien GODARD --- diff --git a/iostat.c b/iostat.c index 6ccaa56..47ec602 100644 --- a/iostat.c +++ b/iostat.c @@ -1676,17 +1676,17 @@ void rw_io_stat_loop(long int count, struct tm *rectime) if (count > 0) { count--; } + if (DISPLAY_JSON_OUTPUT(flags)) { + if (count) { + printf(","); + } + printf("\n"); + } } else { skip = 0; } - if (DISPLAY_JSON_OUTPUT(flags)) { - if (count) { - printf(","); - } - printf("\n"); - } if (count) { curr ^= 1; pause();