summaryrefslogtreecommitdiffstats
path: root/usr.bin/chpass/util.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-27 19:02:40 +0000
committerderaadt <deraadt@openbsd.org>2002-06-27 19:02:40 +0000
commitf57b352e501a834513e94e18dbfdf4869617e350 (patch)
treef4054ed2455361fcdb9233dc5131754431a3e319 /usr.bin/chpass/util.c
parentnote Supplementary group IDs remain unchanged; ok deraadt@ tholo@ (diff)
downloadwireguard-openbsd-f57b352e501a834513e94e18dbfdf4869617e350.tar.xz
wireguard-openbsd-f57b352e501a834513e94e18dbfdf4869617e350.zip
cleanup; mpech & millert ok
Diffstat (limited to 'usr.bin/chpass/util.c')
-rw-r--r--usr.bin/chpass/util.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c
index 3470c2c7be1..e501fada390 100644
--- a/usr.bin/chpass/util.c
+++ b/usr.bin/chpass/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.4 1998/03/30 06:59:34 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.5 2002/06/27 19:02:40 deraadt Exp $ */
/* $NetBSD: util.c,v 1.4 1995/03/26 04:55:35 glass Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: util.c,v 1.4 1998/03/30 06:59:34 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: util.c,v 1.5 2002/06/27 19:02:40 deraadt Exp $";
#endif
#endif /* not lint */
@@ -57,31 +57,25 @@ static char rcsid[] = "$OpenBSD: util.c,v 1.4 1998/03/30 06:59:34 deraadt Exp $"
#include "pathnames.h"
char *
-ttoa(buf, len, tval)
- char *buf;
- size_t len;
- time_t tval;
+ttoa(char *buf, size_t len, time_t tval)
{
if (tval) {
struct tm *tp = localtime(&tval);
(void) strftime(buf, len, "%B %d, %Y", tp);
buf[len - 1] = '\0';
- }
- else if (len > 0)
+ } else if (len > 0)
*buf = '\0';
return (buf);
-}
+}
int
-atot(p, store)
- char *p;
- time_t *store;
+atot(char *p, time_t *store)
{
static struct tm *lt;
struct tm tm;
- char *t;
time_t tval;
+ char *t;
if (!*p) {
*store = 0;
@@ -105,8 +99,7 @@ atot(p, store)
}
char *
-ok_shell(name)
- char *name;
+ok_shell(char *name)
{
char *p, *sh;