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/time/time.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'usr.bin/time') diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 88178a3..c7a2486 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -68,11 +68,9 @@ static void usage(void); static char decimal_point; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { - register int pid; + int pid; int aflag, ch, hflag, lflag, status, pflag; struct timeval before, after; struct rusage ru; @@ -223,7 +221,7 @@ main(argc, argv) } static void -usage() +usage(void) { fprintf(stderr, "usage: time [-al] [-h|-p] [-o file] utility [argument ...]\n"); @@ -234,7 +232,7 @@ usage() * Return the frequency of the kernel's statistics clock. */ static int -getstathz() +getstathz(void) { struct clockinfo clockrate; int mib[2]; @@ -249,10 +247,7 @@ getstathz() } static void -humantime(out, sec, usec) - FILE *out; - long sec; - long usec; +humantime(FILE *out, long sec, long usec) { long days, hrs, mins; -- cgit v1.1