summaryrefslogtreecommitdiffstats
path: root/time.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-22 15:09:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-22 15:09:50 +0000
commit8115cf956fb8f73d10516efae43f559215b9c576 (patch)
treed8ec96fbd0a0dc3d26d967ff9d7049a0665ab84c /time.c
parent9a7bd474b755235e3711c152d9a09a47811d90c1 (diff)
downloadruby-8115cf956fb8f73d10516efae43f559215b9c576.tar.gz
ruby-8115cf956fb8f73d10516efae43f559215b9c576.tar.xz
ruby-8115cf956fb8f73d10516efae43f559215b9c576.zip
* time.c (init_leap_second_info): checks the result of gmtime to
suppress warnings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/time.c b/time.c
index 74f1f2855..ef9f529d1 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;