diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-03-16 09:10:12 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-03-16 09:10:12 -0700 |
commit | f196c7f7afe356c2d99502e8f30efff87a8a718a (patch) | |
tree | f814571902dd30454da5b06cb2b248ce83decf7a /time/offtime.c | |
parent | 96cbe7f482fe89112de414da2bd8e90ffb0dcdbd (diff) | |
download | glibc-f196c7f7afe356c2d99502e8f30efff87a8a718a.zip glibc-f196c7f7afe356c2d99502e8f30efff87a8a718a.tar.gz glibc-f196c7f7afe356c2d99502e8f30efff87a8a718a.tar.bz2 |
Use time_t on ays, rem, y and yg in __offtime
Diffstat (limited to 'time/offtime.c')
-rw-r--r-- | time/offtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/time/offtime.c b/time/offtime.c index 1ccd6a8..56c49f0 100644 --- a/time/offtime.c +++ b/time/offtime.c @@ -31,7 +31,7 @@ __offtime (t, offset, tp) long int offset; struct tm *tp; { - long int days, rem, y; + time_t days, rem, y; const unsigned short int *ip; days = *t / SECS_PER_DAY; @@ -63,7 +63,7 @@ __offtime (t, offset, tp) while (days < 0 || days >= (__isleap (y) ? 366 : 365)) { /* Guess a corrected year, assuming 365 days per year. */ - long int yg = y + days / 365 - (days % 365 < 0); + time_t yg = y + days / 365 - (days % 365 < 0); /* Adjust DAYS and Y to match the guessed year. */ days -= ((yg - y) * 365 |