diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2014-10-26 20:37:16 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2014-10-26 20:37:16 +0000 |
commit | d8508a468e716a887fc49618cdc5f69c0d315de5 (patch) | |
tree | 72e9f457b1e17ce561fb9bc717954b5167c3d586 /usr.sbin | |
parent | 2508be43cbd383ab0ffdf4aa96310bf394659f50 (diff) |
Add explicit braces to suppress compiler warnings.
iostat.c:214:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]
ok guenther@ millert@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/iostat/iostat.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index 3b4d14c9928..fefb7edf4b0 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.35 2014/09/15 19:08:22 miod Exp $ */ +/* $OpenBSD: iostat.c,v 1.36 2014/10/26 20:37:15 brad Exp $ */ /* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */ /* @@ -208,19 +208,21 @@ header(void) return; /* Main Headers. */ - if (ISSET(todo, SHOW_TTY)) + if (ISSET(todo, SHOW_TTY)) { if (ISSET(todo, SHOW_TOTALS)) printf(" tty"); else printf(" tty"); + } if (ISSET(todo, SHOW_STATS_1)) for (i = 0; i < dk_ndrive; i++) - if (cur.dk_select[i]) + if (cur.dk_select[i]) { if (ISSET(todo, SHOW_TOTALS)) printf(" %18.18s ", cur.dk_name[i]); else printf(" %16.16s ", cur.dk_name[i]); + } if (ISSET(todo, SHOW_STATS_2)) for (i = 0; i < dk_ndrive; i++) if (cur.dk_select[i]) @@ -231,11 +233,12 @@ header(void) printf("\n"); /* Sub-Headers. */ - if (ISSET(todo, SHOW_TTY)) + if (ISSET(todo, SHOW_TTY)) { if (ISSET(todo, SHOW_TOTALS)) printf(" tin tout"); else printf(" tin tout"); + } if (ISSET(todo, SHOW_STATS_1)) for (i = 0; i < dk_ndrive; i++) @@ -365,13 +368,14 @@ display(void) if (ISSET(todo, SHOW_TOTALS)) etime = 1.0; - if (ISSET(todo, SHOW_TTY)) + if (ISSET(todo, SHOW_TTY)) { if (ISSET(todo, SHOW_TOTALS)) printf("%6.0f %8.0f", cur.tk_nin / etime, cur.tk_nout / etime); else printf("%4.0f %4.0f", cur.tk_nin / etime, cur.tk_nout / etime); + } if (ISSET(todo, SHOW_STATS_1)) disk_stats(etime); |