From b4339b74aded4c38ebcfe3a2a9b37b900abb8874 Mon Sep 17 00:00:00 2001 From: dwmalone Date: Wed, 4 Sep 2002 23:29:10 +0000 Subject: 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 --- usr.bin/lastcomm/lastcomm.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'usr.bin/lastcomm/lastcomm.c') 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"); -- cgit v1.1