diff options
author | David Malone <dwmalone@FreeBSD.org> | 2002-09-04 23:29:10 +0000 |
---|---|---|
committer | David Malone <dwmalone@FreeBSD.org> | 2002-09-04 23:29:10 +0000 |
commit | f4ac32def255b5968bdd8150057b9c0d14595689 (patch) | |
tree | fb230419005f211ecea1e667385bde9886dbf0d8 /usr.bin/lastcomm/lastcomm.c | |
parent | d946bf789255a84ecbbbdfd07bffb48da063204f (diff) | |
download | src-f4ac32def255b5968bdd8150057b9c0d14595689.tar.gz src-f4ac32def255b5968bdd8150057b9c0d14595689.zip |
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
Notes
Notes:
svn path=/head/; revision=102944
Diffstat (limited to 'usr.bin/lastcomm/lastcomm.c')
-rw-r--r-- | usr.bin/lastcomm/lastcomm.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index 5583b995b395..dc47eb1bfee6 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"); |