diff options
| author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 16:41:04 +0000 |
|---|---|---|
| committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 16:41:04 +0000 |
| commit | b27ec368b397cef75f5fc1a5057bdf29f7aa41b8 (patch) | |
| tree | fec2d8ac37641ab41bfedb779d9393223fabe4f7 | |
| parent | 03efb12af2fe3f0950fbe2e62ea7bbd09a03a20e (diff) | |
merge revision(s) 28305:
* time.c (rb_localtime_r2): fix mixed declarations and code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | time.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sun Jun 13 01:40:52 2010 NARUSE, Yui <naruse@ruby-lang.org> + + * time.c (rb_localtime_r2): fix mixed declarations and code. + Sun Jun 13 01:37:40 2010 NARUSE, Yui <naruse@ruby-lang.org> * ext/dl/lib/dl.rb: don't require when already loaded. @@ -873,10 +873,11 @@ rb_localtime_r2(const time_t *t, struct tm *result) int gmtoff1 = 0; int gmtoff2 = 0; struct tm tmp = *result; + time_t t2; # if defined(HAVE_STRUCT_TM_TM_GMTOFF) gmtoff1 = result->tm_gmtoff; # endif - time_t t2 = mktime(&tmp); + t2 = mktime(&tmp); # if defined(HAVE_STRUCT_TM_TM_GMTOFF) gmtoff2 = tmp.tm_gmtoff; # endif |
