Andrew Talbot : comcat: Declare some variables static and const.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Mar 17 14:35:23 CDT 2007
Module: wine
Branch: master
Commit: 525b5f4e5975a1fde2ecb3fa38ccd1853bfd775c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=525b5f4e5975a1fde2ecb3fa38ccd1853bfd775c
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Fri Mar 16 22:11:54 2007 +0000
comcat: Declare some variables static and const.
---
dlls/comcat/information.c | 28 ++++++++++++++--------------
dlls/comcat/register.c | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/comcat/information.c b/dlls/comcat/information.c
index 1cc6e35..0cbe3a8 100644
--- a/dlls/comcat/information.c
+++ b/dlls/comcat/information.c
@@ -433,9 +433,9 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone(
IEnumCATEGORYINFO **ppenum)
{
IEnumCATEGORYINFOImpl *This = (IEnumCATEGORYINFOImpl *)iface;
- WCHAR keyname[21] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n',
- 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
- 'r', 'i', 'e', 's', 0 };
+ static const WCHAR keyname[] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n',
+ 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
+ 'r', 'i', 'e', 's', 0 };
IEnumCATEGORYINFOImpl *new_this;
TRACE("\n");
@@ -473,9 +473,9 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid)
This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl));
if (This) {
- WCHAR keyname[21] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n',
- 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
- 'r', 'i', 'e', 's', 0 };
+ static const WCHAR keyname[] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n',
+ 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
+ 'r', 'i', 'e', 's', 0 };
This->lpVtbl = &COMCAT_IEnumCATEGORYINFO_Vtbl;
This->lcid = lcid;
@@ -490,7 +490,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid)
static HRESULT COMCAT_GetCategoryDesc(HKEY key, LCID lcid, PWCHAR pszDesc,
ULONG buf_wchars)
{
- WCHAR fmt[4] = { '%', 'l', 'X', 0 };
+ static const WCHAR fmt[] = { '%', 'l', 'X', 0 };
WCHAR valname[5];
HRESULT res;
DWORD type, size = (buf_wchars - 1) * sizeof(WCHAR);
@@ -549,12 +549,12 @@ static HRESULT COMCAT_IsClassOfCategories(
HKEY key,
struct class_categories const* categories)
{
- WCHAR impl_keyname[23] = { 'I', 'm', 'p', 'l', 'e', 'm', 'e', 'n',
- 't', 'e', 'd', ' ', 'C', 'a', 't', 'e',
- 'g', 'o', 'r', 'i', 'e', 's', 0 };
- WCHAR req_keyname[20] = { 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'd',
- ' ', 'C', 'a', 't', 'e', 'g', 'o', 'r',
- 'i', 'e', 's', 0 };
+ static const WCHAR impl_keyname[] = { 'I', 'm', 'p', 'l', 'e', 'm', 'e', 'n',
+ 't', 'e', 'd', ' ', 'C', 'a', 't', 'e',
+ 'g', 'o', 'r', 'i', 'e', 's', 0 };
+ static const WCHAR req_keyname[] = { 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'd',
+ ' ', 'C', 'a', 't', 'e', 'g', 'o', 'r',
+ 'i', 'e', 's', 0 };
HKEY subkey;
HRESULT res;
DWORD index;
@@ -735,7 +735,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone(
IEnumGUID **ppenum)
{
CLSID_IEnumGUIDImpl *This = (CLSID_IEnumGUIDImpl *)iface;
- WCHAR keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 };
+ static const WCHAR keyname[] = { 'C', 'L', 'S', 'I', 'D', 0 };
CLSID_IEnumGUIDImpl *new_this;
DWORD size;
diff --git a/dlls/comcat/register.c b/dlls/comcat/register.c
index 81bf54e..6b1c598 100644
--- a/dlls/comcat/register.c
+++ b/dlls/comcat/register.c
@@ -111,7 +111,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_RegisterCategories(
if (res != ERROR_SUCCESS) return E_FAIL;
for (; cCategories; --cCategories, ++rgci) {
- WCHAR fmt[4] = { '%', 'l', 'X', 0 };
+ static const WCHAR fmt[] = { '%', 'l', 'X', 0 };
WCHAR keyname[39];
WCHAR valname[9];
HKEY cat_key;
More information about the wine-cvs
mailing list