diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-04-30 08:03:52 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-04-30 08:03:52 +0000 |
commit | 4c46fde6963196f34e167734b13fcffab2241d1f (patch) | |
tree | 7812fa2fb5256b0e87dae93d9293360180f68de7 /usr.bin/cvs/cvs.c | |
parent | ef95f61f862fd431036fbdaa41544599c7135300 (diff) |
make usage() __dead; from Tobias Stoeckmann.
Diffstat (limited to 'usr.bin/cvs/cvs.c')
-rw-r--r-- | usr.bin/cvs/cvs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index a05638215e3..cb114ec1975 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.120 2007/04/30 07:00:02 xsa Exp $ */ +/* $OpenBSD: cvs.c,v 1.121 2007/04/30 08:03:51 xsa Exp $ */ /* * Copyright (c) 2006, 2007 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -70,7 +70,7 @@ char *cvs_tmpdir = CVS_TMPDIR_DEFAULT; struct cvsroot *current_cvsroot = NULL; int cvs_getopt(int, char **); -void usage(void); +__dead void usage(void); static void cvs_read_rcfile(void); struct cvs_wklhead temp_files; @@ -113,12 +113,13 @@ cvs_cleanup(void) } } -void +__dead void usage(void) { - fprintf(stderr, + (void)fprintf(stderr, "usage: %s [-flnQqRrtVvw] [-d root] [-e editor] [-s var=val]\n" " [-T tmpdir] [-z level] command [...]\n", __progname); + exit(1); } int @@ -168,10 +169,8 @@ main(int argc, char **argv) argc -= ret; argv += ret; - if (argc == 0) { + if (argc == 0) usage(); - exit(1); - } cvs_command = argv[0]; @@ -378,7 +377,7 @@ cvs_getopt(int argc, char **argv) break; default: usage(); - exit(1); + /* NOTREACHED */ } } |