[PATCH] msvcr120: Declare ret as a float in functions that return a float.

Alex Henrie alexhenrie24 at gmail.com
Mon Jul 24 01:40:33 CDT 2017


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/msvcrt/math.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index b030a63c4a..0249493c9f 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -2431,11 +2431,11 @@ double CDECL MSVCR120_expm1(double x)
 float CDECL MSVCR120_expm1f(float x)
 {
 #ifdef HAVE_EXPM1F
-    double ret = expm1f(x);
+    float ret = expm1f(x);
 #else
-    double ret = exp(x) - 1;
+    float ret = exp(x) - 1;
 #endif
-    if (!isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
+    if (!finitef(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
     return ret;
 }
 
@@ -3087,7 +3087,7 @@ double CDECL MSVCR120_atanh(double x)
 float CDECL MSVCR120_atanhf(float x)
 {
 #ifdef HAVE_ATANHF
-    double ret;
+    float ret;
 
     if (x > 1 || x < -1) {
         MSVCRT_fenv_t env;
@@ -3102,7 +3102,7 @@ float CDECL MSVCR120_atanhf(float x)
 
     ret = atanhf(x);
 
-    if (!isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
+    if (!finitef(ret)) *MSVCRT__errno() = MSVCRT_ERANGE;
     return ret;
 #else
     return MSVCR120_atanh(x);
-- 
2.13.3




More information about the wine-patches mailing list