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/util.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'chpass/util.c') diff --git a/chpass/util.c b/chpass/util.c index 2bfde62..8703aeb 100644 --- a/chpass/util.c +++ b/chpass/util.c @@ -32,13 +32,12 @@ */ #ifndef lint -#if 0 -static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94"; -#endif -static const char rcsid[] = - "$FreeBSD$"; +static const char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + #include #include @@ -52,14 +51,13 @@ static const char rcsid[] = #include "chpass.h" #include "pathnames.h" -static char *months[] = +static const char *months[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", NULL }; char * -ttoa(tval) - time_t tval; +ttoa(time_t tval) { struct tm *tp; static char tbuf[50]; @@ -75,12 +73,11 @@ ttoa(tval) } int -atot(p, store) - char *p; - time_t *store; +atot(char *p, time_t *store) { static struct tm *lt; - char *t, **mp; + char *t; + const char **mp; time_t tval; int day, month, year; @@ -136,8 +133,7 @@ bad: return (1); } char * -ok_shell(name) - char *name; +ok_shell(char *name) { char *p, *sh; -- cgit v1.2.3-56-ge451