diff options
author | Eric Jackson <ericj@cvs.openbsd.org> | 2000-05-19 02:14:32 +0000 |
---|---|---|
committer | Eric Jackson <ericj@cvs.openbsd.org> | 2000-05-19 02:14:32 +0000 |
commit | 4146adcf63c08e9ae024402240b72c7cec1de51b (patch) | |
tree | 5f74ea39cf2f0aa2f11224106239a714c840f770 | |
parent | 4cd09d63bc367c08b82eb9f628d355b3f9dd2526 (diff) |
Make usage() work as expected. deraadt@ ok
-rw-r--r-- | usr.bin/passwd/passwd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c index 570f265e4aa..3c0d5d64295 100644 --- a/usr.bin/passwd/passwd.c +++ b/usr.bin/passwd/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.7 1998/01/20 15:32:21 art Exp $ */ +/* $OpenBSD: passwd.c,v 1.8 2000/05/19 02:14:31 ericj Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)passwd.c 5.5 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$OpenBSD: passwd.c,v 1.7 1998/01/20 15:32:21 art Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.8 2000/05/19 02:14:31 ericj Exp $"; #endif /* not lint */ #include <stdio.h> @@ -69,7 +69,7 @@ int force_yp; extern int local_passwd(char *); extern int yp_passwd(char *); extern int krb_passwd(int, char **); -void usage(void); +void usage(int value); int @@ -123,8 +123,7 @@ main(argc, argv) exit(1); #endif default: - usage(); - exit(1); + usage(1); } argc -= optind; @@ -152,8 +151,7 @@ main(argc, argv) username = argv[0]; break; default: - usage(); - exit(1); + usage(1); } #if defined(KERBEROS) || defined(KERBEROS5) @@ -170,7 +168,9 @@ main(argc, argv) } void -usage(void) +usage(retval) + int retval; { fprintf(stderr, "usage: passwd [-l] [-y] [-k [-n name] [-i instance] [-r realm] [-u username[.instance][@realm]] [user]\n"); + exit(retval); } |