From 0e3e21302624e11bc1bee23ad1af919ed79bc350 Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Tue, 21 Jul 2020 18:42:29 +0200 Subject: [PATCH] Cosmetic changes in code Signed-off-by: Sebastien GODARD --- pidstat.h | 2 +- sadc.c | 8 ++++---- sadf.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pidstat.h b/pidstat.h index 1bcbe6f..9113d2e 100644 --- a/pidstat.h +++ b/pidstat.h @@ -161,7 +161,7 @@ "?")))))) 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 fca0ccf..addb04c 100644 --- 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 6ff4335..3a305b3 100644 --- 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]); } } -- 2.49.0