ruby-changes:52383
From: normal <ko1@a...>
Date: Thu, 30 Aug 2018 12:25:03 +0900 (JST)
Subject: [ruby-changes:52383] normal:r64592 (trunk): hrtime.h: fix typo in non-builtin overflow check
normal 2018-08-30 12:24:55 +0900 (Thu, 30 Aug 2018) New Revision: 64592 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64592 Log: hrtime.h: fix typo in non-builtin overflow check Modified files: trunk/hrtime.h Index: hrtime.h =================================================================== --- hrtime.h (revision 64591) +++ hrtime.h (revision 64592) @@ -64,7 +64,7 @@ rb_hrtime_mul(rb_hrtime_t a, rb_hrtime_t https://github.com/ruby/ruby/blob/trunk/hrtime.h#L64 if (__builtin_mul_overflow(a, b, &c)) return RB_HRTIME_MAX; #else - if (b != 0 && b > RB_HRTIME_MAX / b) /* overflow */ + if (b != 0 && a > RB_HRTIME_MAX / b) /* overflow */ return RB_HRTIME_MAX; c = a * b; #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/