summaryrefslogtreecommitdiffstats
path: root/chpass/util.c
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2002-03-24 10:21:22 +0000
committerMark Murray <markm@FreeBSD.org>2002-03-24 10:21:22 +0000
commit04d1b23be991cae809ac39645d9ac7341ec74885 (patch)
tree570b4de402d47f08b3d2e31389b82165ebf55645 /chpass/util.c
parent12d207dc921798d10a6d3a1371214adbd74a8768 (diff)
downloadpw-darwin-04d1b23be991cae809ac39645d9ac7341ec74885.tar.gz
pw-darwin-04d1b23be991cae809ac39645d9ac7341ec74885.tar.zst
pw-darwin-04d1b23be991cae809ac39645d9ac7341ec74885.zip
Fix warns, ANSIfy, use __FBSDID(), sort headers.
Diffstat (limited to 'chpass/util.c')
-rw-r--r--chpass/util.c24
1 files changed, 10 insertions, 14 deletions
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 <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include <sys/types.h>
#include <ctype.h>
@@ -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;