aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-04-04 10:01:22 -0700
committerRob Landley <rob@landley.net>2018-04-06 11:28:25 -0500
commitb60eaface3b105b077b70cc9cb02ae729663a715 (patch)
tree95ed368cdac81496bd9e4d77b600da174f3afa65
parent0043e99318bfade48c7a378997b691694b06edd0 (diff)
downloadtoybox-b60eaface3b105b077b70cc9cb02ae729663a715.tar.gz
Fix precedence error in vmstat.
toys/other/vmstat.c:98:12: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if ((!toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows); ^ ~
-rw-r--r--toys/other/vmstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/vmstat.c b/toys/other/vmstat.c
index 8e131d9f..44f73d49 100644
--- a/toys/other/vmstat.c
+++ b/toys/other/vmstat.c
@@ -95,7 +95,7 @@ void vmstat_main(void)
if (rows>3 && !(loop % (rows-3))) {
char *header = headers;
- if ((!toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows);
+ if (!(toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows);
else rows = 0;
printf("procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----\n");