зеркало из https://github.com/github/ruby.git
* time.c (find_time_t): test the result of LOCALTIME.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
cb962c5ae5
Коммит
22ce9f81c3
|
@ -1,3 +1,7 @@
|
|||
Fri Jun 11 07:34:25 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* time.c (find_time_t): test the result of LOCALTIME.
|
||||
|
||||
Fri Jun 11 00:42:45 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* time.c (rb_localtime_r2): fix localtime overflow check.
|
||||
|
|
4
time.c
4
time.c
|
@ -2870,7 +2870,7 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp)
|
|||
guess2 += 24 * 60 * 60;
|
||||
if (guess != guess2) {
|
||||
tm = LOCALTIME(&guess2, result);
|
||||
if (tmcmp(tptr, tm) == 0) {
|
||||
if (tm && tmcmp(tptr, tm) == 0) {
|
||||
if (guess < guess2)
|
||||
*tp = guess;
|
||||
else
|
||||
|
@ -2895,7 +2895,7 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp)
|
|||
guess2 -= 24 * 60 * 60;
|
||||
if (guess != guess2) {
|
||||
tm = LOCALTIME(&guess2, result);
|
||||
if (tmcmp(tptr, tm) == 0) {
|
||||
if (tm && tmcmp(tptr, tm) == 0) {
|
||||
if (guess < guess2)
|
||||
*tp = guess2;
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче