diff options
-rw-r--r-- | usr/src/cmd/sa/timex.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/usr/src/cmd/sa/timex.c b/usr/src/cmd/sa/timex.c index d31f514418..027aca7bee 100644 --- a/usr/src/cmd/sa/timex.c +++ b/usr/src/cmd/sa/timex.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,12 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -47,7 +48,7 @@ char fname[20]; /* * Quant[0] will get set to HZ/10 later. */ -char quant[] = { 10, 10, 10, 6, 10, 6, 10, 10, 10 }; +int quant[] = { 10, 10, 10, 6, 10, 6, 10, 10, 10, 10, 10 }; void printt(char *, time_t); void hmstime(char[]); @@ -193,19 +194,19 @@ main(int argc, char **argv) exit(status>>8); } -char *pad = "000 "; +char *pad = "000 "; char *sep = "\0\0.\0:\0:\0\0"; char *nsep = "\0\0.\0 \0 \0\0"; void printt(char *s, time_t a) { - char digit[9]; + int digit[11]; int i; char c; int nonzero; - for (i = 0; i < 9; i++) { + for (i = 0; i < 11; i++) { digit[i] = a % quant[i]; a /= quant[i]; } |