Michael Stefaniuc : msvcrt: Aoid TRUE:FALSE conditional expressions.
Alexandre Julliard
julliard at winehq.org
Mon Aug 13 13:21:20 CDT 2012
Module: wine
Branch: master
Commit: 0409b9895ce48496e4391878a6e2ba7b594822e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0409b9895ce48496e4391878a6e2ba7b594822e7
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Wed Aug 8 21:25:57 2012 +0200
msvcrt: Aoid TRUE:FALSE conditional expressions.
---
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;
}
More information about the wine-cvs
mailing list