summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-12 16:40:25 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-12 16:40:25 +0000
commit051af24359916791ee09cc6c685d9668e780b61f (patch)
tree06f058d314a34e4cc777630df5464e479d76d37a /time.c
parent75033ea16f86679164eac5030c230ca50d86d1cf (diff)
* time.c (rb_localtime_r2): fix mixed declarations and code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/time.c b/time.c
index dae48091a6..ec0f03a967 100644
--- a/time.c
+++ b/time.c
@@ -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