aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chips/opal/opal.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/chips/opal/opal.c b/src/chips/opal/opal.c
index 4994e85..23cb4ff 100644
--- a/src/chips/opal/opal.c
+++ b/src/chips/opal/opal.c
@@ -500,14 +500,9 @@ void Opal_Pan(Opal *self, uint16_t reg_num, uint8_t pan)
}
-static inline int64_t s_opal_Mul32To64(int32_t a, int32_t b)
-{
- return (int64_t)(a) * b;
-}
-
static inline int32_t s_opal_MulDivR(int32_t a, int32_t b, int32_t c)
{
- int64_t ret = (s_opal_Mul32To64(a, b) + ( c / 2 )) / c;
+ int64_t ret = (((int64_t)(a) * b) + ( c / 2 )) / c;
if(ret > INT_MAX)
return INT_MAX;