mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
hrtime.h: fix typo in non-builtin overflow check
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5ba404f4b0
commit
3bcb4ff810
1 changed files with 1 additions and 1 deletions
2
hrtime.h
2
hrtime.h
|
@ -64,7 +64,7 @@ rb_hrtime_mul(rb_hrtime_t a, rb_hrtime_t b)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue