aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/iostat
diff options
context:
space:
mode:
authorAlfonso Gregory <gfunni234@gmail.com>2023-07-07 16:39:23 +0000
committerWarner Losh <imp@FreeBSD.org>2023-07-07 16:45:18 +0000
commita9cce232a6b930d2d1932f1f20a86a84d9cc77cd (patch)
treedbb4bb7f2b8573c2cf974703f37187c7bd7e36a8 /usr.sbin/iostat
parent72e1ea2f13619f3bd299348f281815a6669f3775 (diff)
downloadsrc-a9cce232a6b930d2d1932f1f20a86a84d9cc77cd.tar.gz
src-a9cce232a6b930d2d1932f1f20a86a84d9cc77cd.zip
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
Diffstat (limited to 'usr.sbin/iostat')
-rw-r--r--usr.sbin/iostat/iostat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index 7c4dcf16e0a5..076f2acfe4e0 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -149,7 +149,7 @@ static int dflag = 0, Iflag = 0, Cflag = 0, Tflag = 0, oflag = 0, Kflag = 0;
static int xflag = 0, zflag = 0;
/* local function declarations */
-static void usage(void);
+static void usage(void) __dead2;
static void needhdr(int signo);
static void needresize(int signo);
static void needreturn(int signo);
@@ -173,6 +173,7 @@ usage(void)
fprintf(stderr, "usage: iostat [-CdhIKoTxz?] [-c count] [-M core]"
" [-n devs] [-N system]\n"
"\t [-t type,if,pass] [-w wait] [drives]\n");
+ exit(1);
}
int
@@ -261,8 +262,6 @@ main(int argc, char **argv)
break;
default:
usage();
- exit(1);
- break;
}
}