]> granicus.if.org Git - sysstat/commitdiff
sar/sadf: Remove some dead code again
authorSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 25 Jan 2021 17:54:16 +0000 (18:54 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 25 Jan 2021 17:54:16 +0000 (18:54 +0100)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sadf.c
sar.c

diff --git a/sadf.c b/sadf.c
index 8953f8779f365cc30d85b57c2f532f80db5dfeef..025d44fc861805edd1c7fadd1bdc1bc42028b6e4 100644 (file)
--- 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 45dc1beedf8605f7801d8019dab2e64787d2cdbf..97be5db30249991f438e12ae54efdbc74d82f7d6 100644 (file)
--- 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;
        }