summaryrefslogtreecommitdiffstats
path: root/usr.bin/lastcomm/lastcomm.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-09-04 23:29:10 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-09-04 23:29:10 +0000
commitb4339b74aded4c38ebcfe3a2a9b37b900abb8874 (patch)
treefb230419005f211ecea1e667385bde9886dbf0d8 /usr.bin/lastcomm/lastcomm.c
parent228b93ce829543fee06561687a63c17a7e821dfd (diff)
downloadFreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.zip
FreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.tar.gz
ANSIify function definitions.
Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5
Diffstat (limited to 'usr.bin/lastcomm/lastcomm.c')
-rw-r--r--usr.bin/lastcomm/lastcomm.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c
index 5583b99..dc47eb1 100644
--- a/usr.bin/lastcomm/lastcomm.c
+++ b/usr.bin/lastcomm/lastcomm.c
@@ -77,9 +77,7 @@ static void usage(void);
#define AC_HZ ((double)AHZ)
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
char *p;
struct acct ab;
@@ -222,8 +220,7 @@ main(argc, argv)
}
time_t
-expand(t)
- u_int t;
+expand(u_int t)
{
time_t nt;
@@ -237,8 +234,7 @@ expand(t)
}
char *
-flagbits(f)
- int f;
+flagbits(int f)
{
static char flags[20] = "-";
char *p;
@@ -256,9 +252,7 @@ flagbits(f)
}
int
-requested(argv, acp)
- char *argv[];
- struct acct *acp;
+requested(char *argv[], struct acct *acp)
{
const char *p;
@@ -275,8 +269,7 @@ requested(argv, acp)
}
const char *
-getdev(dev)
- dev_t dev;
+getdev(dev_t dev)
{
static dev_t lastdev = (dev_t)-1;
static const char *lastname;
@@ -291,7 +284,7 @@ getdev(dev)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"usage: lastcomm [-EScesu] [ -f file ] [command ...] [user ...] [tty ...]\n");
OpenPOWER on IntegriCloud