From 04d1b23be991cae809ac39645d9ac7341ec74885 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 24 Mar 2002 10:21:22 +0000 Subject: Fix warns, ANSIfy, use __FBSDID(), sort headers. --- chpass/chpass.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'chpass/chpass.c') diff --git a/chpass/chpass.c b/chpass/chpass.c index f88aa23..433d323 100644 --- a/chpass/chpass.c +++ b/chpass/chpass.c @@ -39,10 +39,11 @@ static const char copyright[] = #ifndef lint static const char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -77,10 +78,10 @@ uid_t uid; void baduser(void); void usage(void); +char localhost[] = "localhost"; + int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { enum { NEWSH, LOADENTRY, EDITENTRY, NEWPW, NEWEXP } op; struct passwd *pw = NULL, lpw, old_pw; @@ -135,7 +136,7 @@ main(argc, argv) #endif yp_domain = optarg; if (yp_server == NULL) - yp_server = "localhost"; + yp_server = localhost; #ifdef PARANOID } #endif @@ -280,13 +281,13 @@ main(argc, argv) } void -baduser() +baduser(void) { errx(1, "%s", strerror(EACCES)); } void -usage() +usage(void) { (void)fprintf(stderr, -- cgit v1.2.3-56-ge451