[前][次][番号順一覧][スレッド一覧]

ruby-changes:42148

From: naruse <ko1@a...>
Date: Tue, 22 Mar 2016 04:14:34 +0900 (JST)
Subject: [ruby-changes:42148] naruse:r54222 (trunk): fix typo

naruse	2016-03-22 04:14:27 +0900 (Tue, 22 Mar 2016)

  New Revision: 54222

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54222

  Log:
    fix typo

  Modified files:
    trunk/time.c
Index: time.c
===================================================================
--- time.c	(revision 54221)
+++ time.c	(revision 54222)
@@ -364,8 +364,7 @@ wmul(wideval_t wx, wideval_t wy) https://github.com/ruby/ruby/blob/trunk/time.c#L364
 {
 #if WIDEVALUE_IS_WIDER
     if (FIXWV_P(wx) && FIXWV_P(wy)) {
-	wideint_t z;
-	if (MUL_OVERFLOW_FIXWV_P(FIXWV2WINT(wx), FIXWV2WINT(wy))
+	if (MUL_OVERFLOW_FIXWV_P(FIXWV2WINT(wx), FIXWV2WINT(wy)))
 	    return WINT2WV(FIXWV2WINT(wx) * FIXWV2WINT(wy));
     }
 #endif
@@ -462,7 +461,7 @@ wdiv(wideval_t wx, wideval_t wy) https://github.com/ruby/ruby/blob/trunk/time.c#L461
     wideval_t q;
     if (wdivmod0(wx, wy, &q, NULL)) return q;
 #endif
-    return v2w(div(wx, wy));
+    return v2w(div(w2v(wx), w2v(wy)));
 }
 
 static wideval_t
@@ -472,7 +471,7 @@ wmod(wideval_t wx, wideval_t wy) https://github.com/ruby/ruby/blob/trunk/time.c#L471
     wideval_t r;
     if (wdivmod0(wx, wy, NULL, &r)) return r;
 #endif
-    return v2w(mod(wx, wy));
+    return v2w(mod(w2v(wx), w2v(wy)));
 }
 
 static VALUE

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]