Andrew Talbot : crypt32: Constify some variables.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 16 07:08:43 CDT 2007
Module: wine
Branch: master
Commit: 9f6a6427ef7aa88dcf92ec569c7aff6559bd2db7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f6a6427ef7aa88dcf92ec569c7aff6559bd2db7
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Sat Apr 14 18:12:40 2007 +0100
crypt32: Constify some variables.
---
dlls/crypt32/sip.c | 4 ++--
dlls/crypt32/store.c | 10 +++++-----
dlls/crypt32/str.c | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c
index 87fcc07..1e24455 100644
--- a/dlls/crypt32/sip.c
+++ b/dlls/crypt32/sip.c
@@ -76,7 +76,7 @@ static void CRYPT_guid2wstr( const GUID *guid, LPWSTR wstr )
*
* Helper function for CryptSIPRemoveProvider
*/
-static LONG CRYPT_SIPDeleteFunction( LPGUID guid, LPCWSTR szKey )
+static LONG CRYPT_SIPDeleteFunction( const GUID *guid, LPCWSTR szKey )
{
WCHAR szFullKey[ 0x100 ];
LONG r = ERROR_SUCCESS;
@@ -150,7 +150,7 @@ BOOL WINAPI CryptSIPRemoveProvider(GUID *pgProv)
* Add a registry key containing a dll name and function under
* "Software\\Microsoft\\Cryptography\\OID\\EncodingType 0\\<func>\\<guid>"
*/
-static LONG CRYPT_SIPWriteFunction( LPGUID guid, LPCWSTR szKey,
+static LONG CRYPT_SIPWriteFunction( const GUID *guid, LPCWSTR szKey,
LPCWSTR szDll, LPCWSTR szFunction )
{
WCHAR szFullKey[ 0x100 ];
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 1447d37..3b9bcb8 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -838,7 +838,7 @@ static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags,
}
static PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(HCRYPTPROV hCryptProv,
- DWORD dwFlags, PWINECRYPT_CERTSTORE memStore, PCERT_STORE_PROV_INFO pProvInfo)
+ DWORD dwFlags, PWINECRYPT_CERTSTORE memStore, const CERT_STORE_PROV_INFO *pProvInfo)
{
PWINE_PROVIDERSTORE ret = (PWINE_PROVIDERSTORE)CryptMemAlloc(
sizeof(WINE_PROVIDERSTORE));
@@ -946,7 +946,7 @@ static PWINECRYPT_CERTSTORE CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider,
return ret;
}
-static void CRYPT_HashToStr(LPBYTE hash, LPWSTR asciiHash)
+static void CRYPT_HashToStr(const BYTE *hash, LPWSTR asciiHash)
{
static const WCHAR fmt[] = { '%','0','2','X',0 };
DWORD i;
@@ -964,7 +964,7 @@ static const WCHAR CRLsW[] = { 'C','R','L','s',0 };
static const WCHAR CTLsW[] = { 'C','T','L','s',0 };
static const WCHAR BlobW[] = { 'B','l','o','b',0 };
-static void CRYPT_RegReadSerializedFromReg(PWINE_REGSTOREINFO store, HKEY key,
+static void CRYPT_RegReadSerializedFromReg(const WINE_REGSTOREINFO *store, HKEY key,
DWORD contextType)
{
LONG rc;
@@ -1057,7 +1057,7 @@ static void CRYPT_RegReadSerializedFromReg(PWINE_REGSTOREINFO store, HKEY key,
} while (!rc);
}
-static void CRYPT_RegReadFromReg(PWINE_REGSTOREINFO store)
+static void CRYPT_RegReadFromReg(const WINE_REGSTOREINFO *store)
{
static const WCHAR * const subKeys[] = { CertsW, CRLsW, CTLsW };
static const DWORD contextFlags[] = { CERT_STORE_CERTIFICATE_CONTEXT_FLAG,
@@ -1080,7 +1080,7 @@ static void CRYPT_RegReadFromReg(PWINE_REGSTOREINFO store)
}
/* Hash is assumed to be 20 bytes in length (a SHA-1 hash) */
-static BOOL CRYPT_WriteSerializedToReg(HKEY key, LPBYTE hash, LPBYTE buf,
+static BOOL CRYPT_WriteSerializedToReg(HKEY key, const BYTE *hash, const BYTE *buf,
DWORD len)
{
WCHAR asciiHash[20 * 2 + 1];
diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c
index e74fc7d..a4e9e92 100644
--- a/dlls/crypt32/str.c
+++ b/dlls/crypt32/str.c
@@ -482,7 +482,7 @@ struct X500TokenW
};
static void CRYPT_KeynameKeeperFromTokenW(struct KeynameKeeper *keeper,
- struct X500TokenW *key)
+ const struct X500TokenW *key)
{
DWORD len = key->end - key->start;
@@ -593,7 +593,7 @@ static DWORD CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators,
* output's pbData must be freed with LocalFree.
*/
static BOOL CRYPT_EncodeValueWithType(DWORD dwCertEncodingType,
- struct X500TokenW *value, PCERT_NAME_BLOB output, DWORD type,
+ const struct X500TokenW *value, PCERT_NAME_BLOB output, DWORD type,
LPCWSTR *ppszError)
{
CERT_NAME_VALUE nameValue = { type, { 0, NULL } };
@@ -634,7 +634,7 @@ static BOOL CRYPT_EncodeValueWithType(DWORD dwCertEncodingType,
}
static BOOL CRYPT_EncodeValue(DWORD dwCertEncodingType,
- struct X500TokenW *value, PCERT_NAME_BLOB output, const DWORD *types,
+ const struct X500TokenW *value, PCERT_NAME_BLOB output, const DWORD *types,
LPCWSTR *ppszError)
{
DWORD i;
More information about the wine-cvs
mailing list