aboutsummaryrefslogtreecommitdiffstats
path: root/hrtime.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-30 03:24:55 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-30 03:24:55 +0000
commitca01b44938427f3f490c35ec2cee8fe194ed84c1 (patch)
tree32d18f76f0a2ee64ba77f8f41f2aa6e9acb7d177 /hrtime.h
parent1c6396e45bbf388052724ae8e5a7abacd7f63cf6 (diff)
downloadruby-ca01b44938427f3f490c35ec2cee8fe194ed84c1.tar.gz
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
Diffstat (limited to 'hrtime.h')
-rw-r--r--hrtime.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hrtime.h b/hrtime.h
index bf606d5fb1..f133bdb1ac 100644
--- a/hrtime.h
+++ b/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