msvcrt: Aoid TRUE:FALSE conditional expressions.

Michael Stefaniuc mstefani at redhat.de
Wed Aug 8 14:25:57 CDT 2012


---
 dlls/msvcrt/file.c |    4 ++--
 dlls/msvcrt/wcs.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index c07ae30..59b7eb8 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -1771,7 +1771,7 @@ int CDECL MSVCRT__sopen_s( int *fd, const char *path, int oflags, int shflags, i
 
   sa.nLength              = sizeof( SECURITY_ATTRIBUTES );
   sa.lpSecurityDescriptor = NULL;
-  sa.bInheritHandle       = (oflags & MSVCRT__O_NOINHERIT) ? FALSE : TRUE;
+  sa.bInheritHandle       = !(oflags & MSVCRT__O_NOINHERIT);
 
   hand = CreateFileA(path, access, sharing, &sa, creation, attrib, 0);
   if (hand == INVALID_HANDLE_VALUE)  {
@@ -1885,7 +1885,7 @@ int CDECL MSVCRT__wsopen_s( int *fd, const MSVCRT_wchar_t* path, int oflags, int
 
   sa.nLength              = sizeof( SECURITY_ATTRIBUTES );
   sa.lpSecurityDescriptor = NULL;
-  sa.bInheritHandle       = (oflags & MSVCRT__O_NOINHERIT) ? FALSE : TRUE;
+  sa.bInheritHandle       = !(oflags & MSVCRT__O_NOINHERIT);
 
   hand = CreateFileW(path, access, sharing, &sa, creation, attrib, 0);
 
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index d9fb0a5..32ee76b 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -50,7 +50,7 @@ int CDECL MSVCRT__get_printf_count_output( void )
 int CDECL MSVCRT__set_printf_count_output( int enable )
 {
     BOOL old = n_format_enabled;
-    n_format_enabled = (enable ? TRUE : FALSE);
+    n_format_enabled = enable != 0;
     return old ? 1 : 0;
 }
 
-- 
1.7.7.6



More information about the wine-patches mailing list