Michael Stefaniuc : setupapi: Avoid TRUE:FALSE conditional expressions.
Alexandre Julliard
julliard at winehq.org
Tue Aug 14 12:59:51 CDT 2012
Module: wine
Branch: master
Commit: 4d28aedaf8180e9eddaf3cfb23c7eec333eb2fa5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d28aedaf8180e9eddaf3cfb23c7eec333eb2fa5
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Thu Aug 9 09:34:54 2012 +0200
setupapi: Avoid TRUE:FALSE conditional expressions.
---
dlls/setupapi/setupcab.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/setupapi/setupcab.c b/dlls/setupapi/setupcab.c
index 156f20c..ea1bc99 100644
--- a/dlls/setupapi/setupcab.c
+++ b/dlls/setupapi/setupcab.c
@@ -194,7 +194,7 @@ static INT_PTR CDECL sc_cb_open(char *pszFile, int oflag, int pmode)
sa.nLength = sizeof( SECURITY_ATTRIBUTES );
sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = (ioflag & _O_NOINHERIT) ? FALSE : TRUE;
+ sa.bInheritHandle = !(ioflag & _O_NOINHERIT);
ret = (INT_PTR) CreateFileA(pszFile, ioflag, sharing, &sa, creation, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -604,8 +604,7 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
if (!my_hsc.hfdi) return FALSE;
- ret = ( sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath,
- 0, sc_FNNOTIFY_A, NULL, &my_hsc) ) ? TRUE : FALSE;
+ ret = sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, 0, sc_FNNOTIFY_A, NULL, &my_hsc);
sc_FDIDestroy(my_hsc.hfdi);
return ret;
@@ -670,8 +669,7 @@ BOOL WINAPI SetupIterateCabinetW(PCWSTR CabinetFile, DWORD Reserved,
if (!my_hsc.hfdi) return FALSE;
- ret = ( sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath,
- 0, sc_FNNOTIFY_W, NULL, &my_hsc) ) ? TRUE : FALSE;
+ ret = sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, 0, sc_FNNOTIFY_W, NULL, &my_hsc);
sc_FDIDestroy(my_hsc.hfdi);
return ret;
More information about the wine-cvs
mailing list