summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-03 12:23:38 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-03 12:23:38 +0000
commitfe21cf8b3667e499086f937c0cbcc89840c7df46 (patch)
tree0660324a9bbbade2e062b87c8f6e57f8a2565532 /time.c
parent185a5a726c6c08d207ce4ac0ecd4c359c94a0198 (diff)
merges r31948 from trunk into ruby_1_9_2.
-- * time.c (rb_gmtime_r2): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@32377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/time.c b/time.c
index 8d7fc868a1..ac69da64ef 100644
--- a/time.c
+++ b/time.c
@@ -905,20 +905,20 @@ rb_localtime_r2(const time_t *t, struct tm *result)
#define LOCALTIME(tm, result) (tzset(),rb_localtime_r2((tm), &(result)))
#if !defined(HAVE_STRUCT_TM_TM_GMTOFF)
- static struct tm *
- rb_gmtime_r2(const time_t *t, struct tm *result)
- {
- result = rb_gmtime_r(t, result);
+static struct tm *
+rb_gmtime_r2(const time_t *t, struct tm *result)
+{
+ result = rb_gmtime_r(t, result);
#if defined(HAVE_TIMEGM) && defined(LOCALTIME_OVERFLOW_PROBLEM)
- if (result) {
- struct tm tmp = *result;
- time_t t2 = timegm(&tmp);
- if (*t != t2)
- result = NULL;
- }
-#endif
- return result;
+ if (result) {
+ struct tm tmp = *result;
+ time_t t2 = timegm(&tmp);
+ if (*t != t2)
+ result = NULL;
}
+#endif
+ return result;
+}
# define GMTIME(tm, result) rb_gmtime_r2((tm), &(result))
#endif