From 0ef69ef9dd04af37fedc0fbec1b40c98b2a7f11d Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 25 Apr 2008 11:14:35 +1000 Subject: [PATCH] crypt32: Use LOWORD on LPCSTR type instead of casting to int. --- dlls/crypt32/chain.c | 8 ++++---- dlls/crypt32/store.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 362eddc726..a13a896091 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -1780,16 +1780,16 @@ BOOL WINAPI CertVerifyCertificateChainPolicy(LPCSTR szPolicyOID, { switch (LOWORD(szPolicyOID)) { - case (int)CERT_CHAIN_POLICY_BASE: + case LOWORD(CERT_CHAIN_POLICY_BASE): verifyPolicy = verify_base_policy; break; - case (int)CERT_CHAIN_POLICY_AUTHENTICODE: + case LOWORD(CERT_CHAIN_POLICY_AUTHENTICODE): verifyPolicy = verify_authenticode_policy; break; - case (int)CERT_CHAIN_POLICY_BASIC_CONSTRAINTS: + case LOWORD(CERT_CHAIN_POLICY_BASIC_CONSTRAINTS): verifyPolicy = verify_basic_constraints_policy; break; - case (int)CERT_CHAIN_POLICY_MICROSOFT_ROOT: + case LOWORD(CERT_CHAIN_POLICY_MICROSOFT_ROOT): verifyPolicy = verify_ms_root_policy; break; default: diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 84d326c62f..9534e5c2d3 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -674,43 +674,43 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider, { switch (LOWORD(lpszStoreProvider)) { - case (int)CERT_STORE_PROV_MSG: + case LOWORD(CERT_STORE_PROV_MSG): openFunc = CRYPT_MsgOpenStore; break; - case (int)CERT_STORE_PROV_MEMORY: + case LOWORD(CERT_STORE_PROV_MEMORY): openFunc = CRYPT_MemOpenStore; break; - case (int)CERT_STORE_PROV_FILE: + case LOWORD(CERT_STORE_PROV_FILE): openFunc = CRYPT_FileOpenStore; break; - case (int)CERT_STORE_PROV_PKCS7: + case LOWORD(CERT_STORE_PROV_PKCS7): openFunc = CRYPT_PKCSOpenStore; break; - case (int)CERT_STORE_PROV_REG: + case LOWORD(CERT_STORE_PROV_REG): openFunc = CRYPT_RegOpenStore; break; - case (int)CERT_STORE_PROV_FILENAME_A: + case LOWORD(CERT_STORE_PROV_FILENAME_A): openFunc = CRYPT_FileNameOpenStoreA; break; - case (int)CERT_STORE_PROV_FILENAME_W: + case LOWORD(CERT_STORE_PROV_FILENAME_W): openFunc = CRYPT_FileNameOpenStoreW; break; - case (int)CERT_STORE_PROV_COLLECTION: + case LOWORD(CERT_STORE_PROV_COLLECTION): openFunc = CRYPT_CollectionOpenStore; break; - case (int)CERT_STORE_PROV_SYSTEM_A: + case LOWORD(CERT_STORE_PROV_SYSTEM_A): openFunc = CRYPT_SysOpenStoreA; break; - case (int)CERT_STORE_PROV_SYSTEM_W: + case LOWORD(CERT_STORE_PROV_SYSTEM_W): openFunc = CRYPT_SysOpenStoreW; break; - case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_A: + case LOWORD(CERT_STORE_PROV_SYSTEM_REGISTRY_A): openFunc = CRYPT_SysRegOpenStoreA; break; - case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_W: + case LOWORD(CERT_STORE_PROV_SYSTEM_REGISTRY_W): openFunc = CRYPT_SysRegOpenStoreW; break; - case (int)CERT_STORE_PROV_PHYSICAL_W: + case LOWORD(CERT_STORE_PROV_PHYSICAL_W): openFunc = CRYPT_PhysOpenStoreW; break; default: -- 2.32.0.93.g670b81a890