msvcrt: Standardize on using a comparison operator to ensure we return 0 or 1.
Francois Gouget
fgouget at free.fr
Sun Dec 1 09:26:14 CST 2013
---
Some places already used "!= 0" while these used "?1:0". I'm fine with
either, I just want consistency.
dlls/msvcrt/math.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 4ec225c..6bcc2b7 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -1217,7 +1217,7 @@ double CDECL MSVCRT__copysign(double num, double sign)
*/
int CDECL MSVCRT__finite(double num)
{
- return (isfinite(num)?1:0); /* See comment for _isnan() */
+ return isfinite(num) != 0; /* See comment for _isnan() */
}
/*********************************************************************
@@ -1246,7 +1246,7 @@ INT CDECL MSVCRT__isnan(double num)
/* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
* Do the same, as the result may be used in calculations
*/
- return isnan(num) ? 1 : 0;
+ return isnan(num) != 0;
}
/*********************************************************************
--
1.8.4.3
More information about the wine-patches
mailing list