1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Close the file list before opening the container that holds the

totals, otherwise we end up emitting invalid JSON -- provided
libxo does not prevent us from doing that.

PR:		197499
Submitted by:	allanjude@
This commit is contained in:
Marcel Moolenaar 2015-02-11 17:56:24 +00:00
parent ec6c61d896
commit 399d34850f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278590

View File

@ -140,12 +140,14 @@ main(int argc, char *argv[])
} while(*++argv);
}
xo_close_list("file");
if (total > 1) {
xo_open_container("total");
show_cnt("total", tlinect, twordct, tcharct, tlongline);
xo_close_container("total");
}
xo_close_list("file");
xo_close_container("wc");
xo_finish();
exit(errors == 0 ? 0 : 1);