From 4c46fde6963196f34e167734b13fcffab2241d1f Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Mon, 30 Apr 2007 08:03:52 +0000 Subject: make usage() __dead; from Tobias Stoeckmann. --- usr.bin/cvs/cvs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'usr.bin/cvs/cvs.c') 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 * Copyright (c) 2004 Jean-Francois Brousseau @@ -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 */ } } -- cgit v1.2.3