]> granicus.if.org Git - sysstat/commit
A_SERIAL: Don't increment serial line number before saving
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 23 Dec 2017 16:04:21 +0000 (17:04 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 23 Dec 2017 16:04:21 +0000 (17:04 +0100)
commitf7af38558e5f56ed34ee4855061b4fd0f56d0f82
treedcc7962b45eb9a331379de8cf6eea631f964b1e2
parent39ba5613c580804a6c394b04360ca6b8fbc9f928
A_SERIAL: Don't increment serial line number before saving

The line number, as saved in the stats_serial structure, was used to
determine if the structure was empty or not: A value of 0 used to mean
that the structure was actually empty. As a consequence line #0 was
saved with the value 1, line #1 was saved with the value 2, etc.
This is no longer useful as structures are now dynamically allocated and
we know exactly how many of them we have.
So save now the real line number.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
json_stats.c
pr_stats.c
rd_stats.c
rd_stats.h
rndr_stats.c
xml_stats.c