diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-04-05 01:31:31 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-04-05 01:31:31 +0000 |
commit | 013ee6c80f4cdef392d8d4e4bcffd98bea7e642f (patch) | |
tree | bd3fd4f69a16761473d165bfea19bd544fd222de /bin/ksh | |
parent | 14d9c59da9ea547b6368996a4f4b5b5edd2a73c1 (diff) |
SECONDS is, in a highly theoretical way, not y2k38 safe. comment it.
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/var.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ksh/var.c b/bin/ksh/var.c index 77d3969ca2d..d0c90ab6293 100644 --- a/bin/ksh/var.c +++ b/bin/ksh/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.34 2007/10/15 02:16:35 deraadt Exp $ */ +/* $OpenBSD: var.c,v 1.35 2013/04/05 01:31:30 tedu Exp $ */ #include "sh.h" #include <time.h> @@ -921,7 +921,7 @@ getspec(struct tbl *vp) * (see initcoms[] in main.c). */ if (vp->flag & ISSET) - setint(vp, (long) (time((time_t *)0) - seconds)); + setint(vp, (long)(time(NULL) - seconds)); /* XXX 2038 */ vp->flag |= SPECIAL; break; case V_RANDOM: @@ -1035,7 +1035,7 @@ setspec(struct tbl *vp) break; case V_SECONDS: vp->flag &= ~SPECIAL; - seconds = time((time_t*) 0) - intval(vp); + seconds = time(NULL) - intval(vp); /* XXX 2038 */ vp->flag |= SPECIAL; break; case V_TMOUT: |