summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--time.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c80cd2117f..a4e949666d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 23 00:10:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * time.c (init_leap_second_info): checks the result of gmtime to
+ suppress warnings.
+
Wed Jul 22 22:23:24 2009 Yusuke Endoh <mame@tsg.ne.jp>
* vm_core.h (struct rb_iseq_t): add a new field line_no. This field
diff --git a/time.c b/time.c
index 74f1f28555b..ef9f529d15a 100644
--- a/time.c
+++ b/time.c
@@ -522,6 +522,7 @@ init_leap_second_info()
now = time(NULL);
gmtime(&now);
tm = gmtime_with_leapsecond(&now, &result);
+ if (!tm) return;
this_year = tm->tm_year;
max = ~(time_t)0;