diff options
author | Bruce Evans <bde@FreeBSD.org> | 1998-06-28 18:19:13 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1998-06-28 18:19:13 +0000 |
commit | f8ec5fe2822fc750ad7330211407984bdee52cdd (patch) | |
tree | dffdc1ef93cf0993248f0ec7635a57913066fa23 /bin/ps | |
parent | 0eb7b1cad087ee61e16fa96fa68b5dbe191f3dc4 (diff) | |
download | src-f8ec5fe2822fc750ad7330211407984bdee52cdd.tar.gz src-f8ec5fe2822fc750ad7330211407984bdee52cdd.zip |
Fixed printf format errors.
Notes
Notes:
svn path=/head/; revision=37231
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/print.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 40ad844b197b..00a8ca9a6fbf 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #endif static const char rcsid[] = - "$Id: print.c,v 1.27 1998/05/28 09:29:43 phk Exp $"; + "$Id: print.c,v 1.28 1998/05/31 12:09:50 bde Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -341,6 +341,7 @@ started(k, ve) { VAR *v; static time_t now; + time_t then; struct tm *tp; char buf[100]; @@ -350,7 +351,8 @@ started(k, ve) return; } - tp = localtime(&k->ki_u.u_start.tv_sec); + then = k->ki_u.u_start.tv_sec; + tp = localtime(&then); if (!now) (void)time(&now); if (now - k->ki_u.u_start.tv_sec < 24 * 3600) { @@ -372,6 +374,7 @@ lstarted(k, ve) VARENT *ve; { VAR *v; + time_t then; char buf[100]; v = ve->var; @@ -379,8 +382,8 @@ lstarted(k, ve) (void)printf("%-*s", v->width, "-"); return; } - (void)strftime(buf, sizeof(buf) -1, "%c", - localtime(&k->ki_u.u_start.tv_sec)); + then = k->ki_u.u_start.tv_sec; + (void)strftime(buf, sizeof(buf) -1, "%c", localtime(&then)); (void)printf("%-*s", v->width, buf); } |