From: Sebastien GODARD Date: Mon, 25 Jan 2021 17:54:16 +0000 (+0100) Subject: sar/sadf: Remove some dead code again X-Git-Tag: v12.5.3~11^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e02c70056f4f9376fa8a8c8308bd3515f633e9ef;p=sysstat sar/sadf: Remove some dead code again Signed-off-by: Sebastien GODARD --- diff --git a/sadf.c b/sadf.c index 8953f87..025d44f 100644 --- a/sadf.c +++ b/sadf.c @@ -681,17 +681,12 @@ int generic_write_stats(int curr, int use_tm_start, int use_tm_end, int reset, cross_day = TRUE; } - /* Check time (2) */ - if (use_tm_start && (datecmp(rectime, &tm_start, cross_day) < 0)) - /* it's too soon... */ - return 0; - /* Get interval values in 1/100th of a second */ get_itv_value(&record_hdr[curr], &record_hdr[!curr], &itv); - /* Check time (3) */ + /* Check time (2) */ if (use_tm_end && (datecmp(rectime, &tm_end, cross_day) > 0)) { - /* It's too late... */ + /* End time exceeded */ *cnt = 0; return 0; } diff --git a/sar.c b/sar.c index 45dc1be..97be5db 100644 --- a/sar.c +++ b/sar.c @@ -486,17 +486,12 @@ int write_stats(int curr, int read_from_file, long *cnt, int use_tm_start, cross_day = TRUE; } - /* Check time (2) */ - if (use_tm_start && (datecmp(&rectime, &tm_start, cross_day) < 0)) - /* it's too soon... */ - return 0; - /* Get interval value in 1/100th of a second */ get_itv_value(&record_hdr[curr], &record_hdr[!curr], &itv); - /* Check time (3) */ + /* Check time (2) */ if (use_tm_end && (datecmp(&rectime, &tm_end, cross_day) > 0)) { - /* It's too late... */ + /* End time exceeded */ *cnt = 0; return 0; }