summaryrefslogtreecommitdiff
path: root/lib/libc/stdtime
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-12-02 01:05:08 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-12-02 01:05:08 +0000
commita5bf4e71efaefa04bef320206b5b681a54ac914f (patch)
tree31bd6c13e2a6bc309ae7a12cf40cbda6e038253b /lib/libc/stdtime
parent431dda01b61cc5a4235ddd9dc5d5fdb34fcd6272 (diff)
Notes
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r--lib/libc/stdtime/localtime.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index f37f3329488c..c0442746de7d 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -1222,7 +1222,7 @@ struct tm * const tmp;
const struct lsinfo * lp;
long days;
long rem;
- int y;
+ long y;
int yleap;
const int * ip;
long corr;
@@ -1291,7 +1291,7 @@ struct tm * const tmp;
y = EPOCH_YEAR;
#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
while (days < 0 || days >= (long) year_lengths[yleap = isleap(y)]) {
- int newy;
+ long newy;
newy = y + days / DAYSPERNYEAR;
if (days < 0)
@@ -1476,12 +1476,6 @@ int * const okayp;
*/
bits = TYPE_BIT(time_t) - 1;
/*
- * Limit to 32 bits or the things go crazy
- * when it tries to figure out times near 2^62 etc.
- */
- if (bits > 31)
- bits = 31;
- /*
** If time_t is signed, then 0 is just above the median,
** assuming two's complement arithmetic.
** If time_t is unsigned, then (1 << bits) is just above the median.