Michael Stefaniuc : credui: Avoid TRUE:FALSE conditional expressions, .

Alexandre Julliard julliard at winehq.org
Mon Aug 13 13:21:20 CDT 2012


Module: wine
Branch: master
Commit: 69d44b54f927d9800758d6179cb250387fc7a375
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=69d44b54f927d9800758d6179cb250387fc7a375

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Aug  8 21:06:42 2012 +0200

credui: Avoid TRUE:FALSE conditional expressions,.

---

 dlls/credui/credui_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c
index 1409c20..5a8c05c 100644
--- a/dlls/credui/credui_main.c
+++ b/dlls/credui/credui_main.c
@@ -337,7 +337,7 @@ static void CredDialogHideBalloonTip(HWND hwndDlg, struct cred_dialog_params *pa
 
 static inline BOOL CredDialogCapsLockOn(void)
 {
-    return GetKeyState(VK_CAPITAL) & 0x1 ? TRUE : FALSE;
+    return (GetKeyState(VK_CAPITAL) & 0x1) != 0;
 }
 
 static LRESULT CALLBACK CredDialogPasswordSubclassProc(HWND hwnd, UINT uMsg,
@@ -649,13 +649,13 @@ DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo,
             len = strlenW(params.pszPassword);
             entry->pszPassword = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR));
             memcpy(entry->pszPassword, params.pszPassword, (len + 1)*sizeof(WCHAR));
-            entry->generic = dwFlags & CREDUI_FLAGS_GENERIC_CREDENTIALS ? TRUE : FALSE;
+            entry->generic = (dwFlags & CREDUI_FLAGS_GENERIC_CREDENTIALS) != 0;
 
             LeaveCriticalSection(&csPendingCredentials);
         }
         else
             result = save_credentials(pszTargetName, pszUsername, pszPassword,
-                                      dwFlags & CREDUI_FLAGS_GENERIC_CREDENTIALS ? TRUE : FALSE);
+                                      (dwFlags & CREDUI_FLAGS_GENERIC_CREDENTIALS) != 0);
     }
 
     return result;




More information about the wine-cvs mailing list