diff options
-rw-r--r-- | usr.bin/time/time.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index d4067da629b..aa60c59330e 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.15 2003/06/10 22:20:53 deraadt Exp $ */ +/* $OpenBSD: time.c,v 1.16 2006/05/17 13:31:22 grunk Exp $ */ /* $NetBSD: time.c,v 1.7 1995/06/27 00:34:00 jtc Exp $ */ /* @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: time.c,v 1.15 2003/06/10 22:20:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: time.c,v 1.16 2006/05/17 13:31:22 grunk Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -79,7 +79,6 @@ main(int argc, char *argv[]) case 'p': portableflag = 1; break; - case '?': default: usage(); /* NOTREACHED */ @@ -88,8 +87,8 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - - if (argc < 1) + + if (argc < 1) usage(); gettimeofday(&before, (struct timezone *)NULL); @@ -118,7 +117,7 @@ main(int argc, char *argv[]) timersub(&after, &before, &after); if (portableflag) { - fprintf(stderr, "real %9ld.%02ld\n", + fprintf(stderr, "real %9ld.%02ld\n", after.tv_sec, after.tv_usec/10000); fprintf(stderr, "user %9ld.%02ld\n", ru.ru_utime.tv_sec, ru.ru_utime.tv_usec/10000); @@ -126,7 +125,7 @@ main(int argc, char *argv[]) ru.ru_stime.tv_sec, ru.ru_stime.tv_usec/10000); } else { - fprintf(stderr, "%9ld.%02ld real ", + fprintf(stderr, "%9ld.%02ld real ", after.tv_sec, after.tv_usec/10000); fprintf(stderr, "%9ld.%02ld user ", ru.ru_utime.tv_sec, ru.ru_utime.tv_usec/10000); @@ -191,10 +190,10 @@ main(int argc, char *argv[]) exit(WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE); } -__dead void +__dead void usage(void) { - extern char *__progname; + extern char *__progname; (void)fprintf(stderr, "usage: %s [-lp] command\n", __progname); exit(1); |