]> granicus.if.org Git - sysstat/commitdiff
Cosmetic changes in code
authorSebastien GODARD <sysstat@users.noreply.github.com>
Tue, 21 Jul 2020 16:42:29 +0000 (18:42 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Tue, 21 Jul 2020 16:42:29 +0000 (18:42 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
pidstat.h
sadc.c
sadf.c

index 1bcbe6f3983a467b4dbcc09135d5c576e4699973..9113d2e3df545619bbe6330a7de407f95e9ad64e 100644 (file)
--- a/pidstat.h
+++ b/pidstat.h
        "?"))))))
 
 struct pid_stats {
-       unsigned long long read_bytes                   __attribute__ ((aligned (16)));
+       unsigned long long read_bytes                   __attribute__ ((aligned (8)));
        unsigned long long write_bytes                  __attribute__ ((packed));
        unsigned long long cancelled_write_bytes        __attribute__ ((packed));
        unsigned long long blkio_swapin_delays          __attribute__ ((packed));
diff --git a/sadc.c b/sadc.c
index fca0ccf39fc94f108ee4fde7238e3c09df5a213e..addb04c5218fc76324d40c6c6f5984147a629499 100644 (file)
--- a/sadc.c
+++ b/sadc.c
@@ -62,7 +62,7 @@ extern int __env;
 
 extern char *tzname[2];
 
-long interval = 0;
+long interval = -1;
 uint64_t flags = 0;
 
 int optz = 0;
@@ -1299,7 +1299,7 @@ int main(int argc, char **argv)
                        }
                }
 
-               else if (!interval) {
+               else if (interval < 0) {
                        /* Get interval */
                        interval = atol(argv[opt]);
                        if (interval < 1) {
@@ -1371,7 +1371,7 @@ int main(int argc, char **argv)
                print_collect_error();
        }
 
-       if (!interval && !comment[0]) {
+       if ((interval < 0) && !comment[0]) {
                /*
                 * Interval (and count) not set, and no comment given
                 * => We are going to insert a restart mark.
@@ -1392,7 +1392,7 @@ int main(int argc, char **argv)
        open_ofile(&ofd, ofile, restart_mark);
        open_stdout(&stdfd);
 
-       if (!interval) {
+       if (interval < 0) {
                if (ofd >= 0) {
                        /*
                         * Interval (and count) not set:
diff --git a/sadf.c b/sadf.c
index 6ff4335bb515635656fe0a432b8fe8c38cbadd26..3a305b39971d7a43587cb2a21f633d58369dc92d 100644 (file)
--- a/sadf.c
+++ b/sadf.c
@@ -1816,7 +1816,7 @@ int main(int argc, char **argv)
                                usage(argv[0]);
                        }
                        interval = atol(argv[opt++]);
-                       if (interval <= 0) {
+                       if (interval < 1) {
                                usage(argv[0]);
                        }
                }