/* SIGINT signal caught => Terminate JSON output properly */
count = 0;
}
- else if (DISPLAY_JSON_OUTPUT(flags) && count && !skip) {
+ else if (DISPLAY_JSON_OUTPUT(flags) && !skip) { /* count != 0 */
printf(",");
}
skip = 0;
}
}
- if (!DISPLAY_ZERO_OMIT(flags) || dispavg || WANT_SINCE_BOOT(flags) || !found ||
- (found && memcmp(sfp, sfc, STATS_FILESYSTEM_SIZE2CMP))) {
+ if (!DISPLAY_ZERO_OMIT(flags) || dispavg
+ || WANT_SINCE_BOOT(flags)
+ || !found
+ /* found is true */
+ || memcmp(sfp, sfc, STATS_FILESYSTEM_SIZE2CMP)) {
printf("%-11s", (dispavg ? _("Summary:") : timestamp[curr]));
cprintf_f(unit, FALSE, 2, 9, 0,