regedit: Remove unneeded variable initializations.

oldstable
Francois Gouget 2008-11-12 11:10:00 +01:00 committed by Alexandre Julliard
parent 078fc191f8
commit 71af3e1582
1 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ WCHAR* GetWideString(const char* strA)
{ {
if(strA) if(strA)
{ {
WCHAR* strW = NULL; WCHAR* strW;
int len = MultiByteToWideChar(CP_ACP, 0, strA, -1, NULL, 0); int len = MultiByteToWideChar(CP_ACP, 0, strA, -1, NULL, 0);
strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
@ -92,7 +92,7 @@ WCHAR* GetWideStringN(const char* strA, int chars, DWORD *len)
{ {
if(strA) if(strA)
{ {
WCHAR* strW = NULL; WCHAR* strW;
*len = MultiByteToWideChar(CP_ACP, 0, strA, chars, NULL, 0); *len = MultiByteToWideChar(CP_ACP, 0, strA, chars, NULL, 0);
strW = HeapAlloc(GetProcessHeap(), 0, *len * sizeof(WCHAR)); strW = HeapAlloc(GetProcessHeap(), 0, *len * sizeof(WCHAR));
@ -112,7 +112,7 @@ char* GetMultiByteString(const WCHAR* strW)
{ {
if(strW) if(strW)
{ {
char* strA = NULL; char* strA;
int len = WideCharToMultiByte(CP_ACP, 0, strW, -1, NULL, 0, NULL, NULL); int len = WideCharToMultiByte(CP_ACP, 0, strW, -1, NULL, 0, NULL, NULL);
strA = HeapAlloc(GetProcessHeap(), 0, len); strA = HeapAlloc(GetProcessHeap(), 0, len);
@ -131,7 +131,7 @@ char* GetMultiByteStringN(const WCHAR* strW, int chars, DWORD* len)
{ {
if(strW) if(strW)
{ {
char* strA = NULL; char* strA;
*len = WideCharToMultiByte(CP_ACP, 0, strW, chars, NULL, 0, NULL, NULL); *len = WideCharToMultiByte(CP_ACP, 0, strW, chars, NULL, 0, NULL, NULL);
strA = HeapAlloc(GetProcessHeap(), 0, *len); strA = HeapAlloc(GetProcessHeap(), 0, *len);