summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1995-04-05 11:35:21 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:32 +0900
commit11e21a36bc935088f88a7cd1548f8c74c3bf6099 (patch)
tree250c579beedb2a35708b0cea682bbad2280bdfd0 /time.c
parent4e65eab7abf53838579600e3dcc99a43012c45c2 (diff)
version 0.72v0_72
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.71-0.72.diff.gz Wed Apr 5 11:35:21 1995 Yukihiro Matsumoto (matz@ix-02) * version 0.72 * EWS4800対応 * file.c: utimesがない時はutimeを使うように.
Diffstat (limited to 'time.c')
-rw-r--r--time.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/time.c b/time.c
index ae2aa4f286f..74738bdb268 100644
--- a/time.c
+++ b/time.c
@@ -83,7 +83,7 @@ time_timeval(time)
VALUE time;
{
struct time_object *tobj;
- static struct timeval t, *tp;
+ static struct timeval t;
switch (TYPE(time)) {
case T_FIXNUM:
@@ -91,7 +91,6 @@ time_timeval(time)
if (t.tv_sec < 0)
Fail("time must be positive");
t.tv_usec = 0;
- tp = &t;
break;
case T_FLOAT:
@@ -104,7 +103,6 @@ time_timeval(time)
microseconds = (RFLOAT(time)->value - seconds) * 1000000.0;
t.tv_sec = seconds;
t.tv_usec = microseconds;
- tp = &t;
}
break;
@@ -113,10 +111,10 @@ time_timeval(time)
Fail("Can't convert %s into Time", rb_class2name(CLASS_OF(time)));
}
GetTimeval(time, tobj);
- tp = &(tobj->tv);
+ t = tobj->tv;
break;
}
- return tp;
+ return &t;
}
static VALUE