summaryrefslogtreecommitdiff
path: root/include/ruby/internal/arithmetic/long.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/internal/arithmetic/long.h')
-rw-r--r--include/ruby/internal/arithmetic/long.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/arithmetic/long.h b/include/ruby/internal/arithmetic/long.h
index 792f7be179..6b8fd8ffc3 100644
--- a/include/ruby/internal/arithmetic/long.h
+++ b/include/ruby/internal/arithmetic/long.h
@@ -115,7 +115,7 @@ RB_INT2FIX(long i)
/* :NOTE: VALUE can be wider than long. As j being unsigned, 2j+1 is fully
* defined. Also it can be compiled into a single LEA instruction. */
const unsigned long j = i;
- const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG;
+ const unsigned long k = (j << 1) + RUBY_FIXNUM_FLAG;
const long l = k;
const SIGNED_VALUE m = l; /* Sign extend */
const VALUE n = m;