Alexandre Julliard : gdi32: Avoid some pointer casts.
Alexandre Julliard
julliard at winehq.org
Mon Jan 26 10:14:23 CST 2009
Module: wine
Branch: master
Commit: 3939cb5c821b7ac5b0681450ec85076fa4d5c712
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3939cb5c821b7ac5b0681450ec85076fa4d5c712
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jan 26 15:09:18 2009 +0100
gdi32: Avoid some pointer casts.
---
dlls/gdi32/freetype.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index ec78045..1ca6953 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2555,7 +2555,6 @@ BOOL WineEngInit(void)
static const WCHAR pathW[] = {'P','a','t','h',0};
HKEY hkey;
DWORD valuelen, datalen, i = 0, type, dlen, vlen;
- LPVOID data;
WCHAR windowsdir[MAX_PATH];
char *unixname;
HANDLE font_mutex;
@@ -2605,7 +2604,7 @@ BOOL WineEngInit(void)
if(RegOpenKeyW(HKEY_LOCAL_MACHINE,
is_win9x() ? win9x_font_reg_key : winnt_font_reg_key,
&hkey) == ERROR_SUCCESS) {
- LPWSTR valueW;
+ LPWSTR data, valueW;
RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
&valuelen, &datalen, NULL, NULL);
@@ -2616,17 +2615,17 @@ BOOL WineEngInit(void)
{
dlen = datalen * sizeof(WCHAR);
vlen = valuelen;
- while(RegEnumValueW(hkey, i++, valueW, &vlen, NULL, &type, data,
+ while(RegEnumValueW(hkey, i++, valueW, &vlen, NULL, &type, (LPBYTE)data,
&dlen) == ERROR_SUCCESS) {
- if(((LPWSTR)data)[0] && ((LPWSTR)data)[1] == ':')
+ if(data[0] && (data[1] == ':'))
{
- if((unixname = wine_get_unix_file_name((LPWSTR)data)))
+ if((unixname = wine_get_unix_file_name(data)))
{
AddFontFileToList(unixname, NULL, NULL, ADDFONT_FORCE_BITMAP);
HeapFree(GetProcessHeap(), 0, unixname);
}
}
- else if(dlen / 2 >= 6 && !strcmpiW(((LPWSTR)data) + dlen / 2 - 5, dot_fonW))
+ else if(dlen / 2 >= 6 && !strcmpiW(data + dlen / 2 - 5, dot_fonW))
{
WCHAR pathW[MAX_PATH];
static const WCHAR fmtW[] = {'%','s','\\','%','s','\0'};
More information about the wine-cvs
mailing list