Commit e48bbc23 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

setupapi: Remove unneeded casts.

parent e4ca5c56
...@@ -1116,7 +1116,7 @@ SetupDiCreateDeviceInfoListExA(const GUID *ClassGuid, ...@@ -1116,7 +1116,7 @@ SetupDiCreateDeviceInfoListExA(const GUID *ClassGuid,
{ {
MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
if (MachineNameW == NULL) if (MachineNameW == NULL)
return (HDEVINFO)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
hDevInfo = SetupDiCreateDeviceInfoListExW(ClassGuid, hwndParent, hDevInfo = SetupDiCreateDeviceInfoListExW(ClassGuid, hwndParent,
...@@ -1160,20 +1160,20 @@ SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid, ...@@ -1160,20 +1160,20 @@ SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid,
{ {
FIXME("remote support is not implemented\n"); FIXME("remote support is not implemented\n");
SetLastError(ERROR_INVALID_MACHINENAME); SetLastError(ERROR_INVALID_MACHINENAME);
return (HDEVINFO)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
if (Reserved != NULL) if (Reserved != NULL)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return (HDEVINFO)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
list = HeapAlloc(GetProcessHeap(), 0, size); list = HeapAlloc(GetProcessHeap(), 0, size);
if (!list) if (!list)
{ {
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return (HDEVINFO)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
list->magic = SETUP_DEVICE_INFO_SET_MAGIC; list->magic = SETUP_DEVICE_INFO_SET_MAGIC;
...@@ -1243,7 +1243,7 @@ HKEY WINAPI SetupDiCreateDevRegKeyW( ...@@ -1243,7 +1243,7 @@ HKEY WINAPI SetupDiCreateDevRegKeyW(
TRACE("%p %p %d %d %d %p %s\n", DeviceInfoSet, DeviceInfoData, Scope, TRACE("%p %p %d %d %d %p %s\n", DeviceInfoSet, DeviceInfoData, Scope,
HwProfile, KeyType, InfHandle, debugstr_w(InfSectionName)); HwProfile, KeyType, InfHandle, debugstr_w(InfSectionName));
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
...@@ -1387,7 +1387,7 @@ BOOL WINAPI SetupDiCreateDeviceInfoW( ...@@ -1387,7 +1387,7 @@ BOOL WINAPI SetupDiCreateDeviceInfoW(
SetLastError(ERROR_INVALID_DEVINST_NAME); SetLastError(ERROR_INVALID_DEVINST_NAME);
return FALSE; return FALSE;
} }
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
...@@ -1520,7 +1520,7 @@ BOOL WINAPI SetupDiRegisterDeviceInfo( ...@@ -1520,7 +1520,7 @@ BOOL WINAPI SetupDiRegisterDeviceInfo(
TRACE("%p %p %08x %p %p %p\n", DeviceInfoSet, DeviceInfoData, Flags, TRACE("%p %p %08x %p %p %p\n", DeviceInfoSet, DeviceInfoData, Flags,
CompareProc, CompareContext, DupDeviceInfoData); CompareProc, CompareContext, DupDeviceInfoData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
...@@ -1567,7 +1567,7 @@ BOOL WINAPI SetupDiEnumDeviceInfo( ...@@ -1567,7 +1567,7 @@ BOOL WINAPI SetupDiEnumDeviceInfo(
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
} }
if (devinfo && devinfo != (HDEVINFO)INVALID_HANDLE_VALUE) if (devinfo && devinfo != INVALID_HANDLE_VALUE)
{ {
struct DeviceInfoSet *list = (struct DeviceInfoSet *)devinfo; struct DeviceInfoSet *list = (struct DeviceInfoSet *)devinfo;
if (list->magic == SETUP_DEVICE_INFO_SET_MAGIC) if (list->magic == SETUP_DEVICE_INFO_SET_MAGIC)
...@@ -1907,7 +1907,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsA( ...@@ -1907,7 +1907,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsA(
enumstrW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); enumstrW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!enumstrW) if (!enumstrW)
{ {
ret = (HDEVINFO)INVALID_HANDLE_VALUE; ret = INVALID_HANDLE_VALUE;
goto end; goto end;
} }
MultiByteToWideChar(CP_ACP, 0, enumstr, -1, enumstrW, len); MultiByteToWideChar(CP_ACP, 0, enumstr, -1, enumstrW, len);
...@@ -1941,7 +1941,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExA( ...@@ -1941,7 +1941,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExA(
enumstrW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); enumstrW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!enumstrW) if (!enumstrW)
{ {
ret = (HDEVINFO)INVALID_HANDLE_VALUE; ret = INVALID_HANDLE_VALUE;
goto end; goto end;
} }
MultiByteToWideChar(CP_ACP, 0, enumstr, -1, enumstrW, len); MultiByteToWideChar(CP_ACP, 0, enumstr, -1, enumstrW, len);
...@@ -1953,7 +1953,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExA( ...@@ -1953,7 +1953,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExA(
if (!machineW) if (!machineW)
{ {
HeapFree(GetProcessHeap(), 0, enumstrW); HeapFree(GetProcessHeap(), 0, enumstrW);
ret = (HDEVINFO)INVALID_HANDLE_VALUE; ret = INVALID_HANDLE_VALUE;
goto end; goto end;
} }
MultiByteToWideChar(CP_ACP, 0, machine, -1, machineW, len); MultiByteToWideChar(CP_ACP, 0, machine, -1, machineW, len);
...@@ -2362,7 +2362,7 @@ BOOL WINAPI SetupDiGetDeviceInfoListDetailA( ...@@ -2362,7 +2362,7 @@ BOOL WINAPI SetupDiGetDeviceInfoListDetailA(
TRACE("%p %p\n", DeviceInfoSet, DevInfoData); TRACE("%p %p\n", DeviceInfoSet, DevInfoData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
...@@ -2395,7 +2395,7 @@ BOOL WINAPI SetupDiGetDeviceInfoListDetailW( ...@@ -2395,7 +2395,7 @@ BOOL WINAPI SetupDiGetDeviceInfoListDetailW(
TRACE("%p %p\n", DeviceInfoSet, DevInfoData); TRACE("%p %p\n", DeviceInfoSet, DevInfoData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
...@@ -2470,7 +2470,7 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceW( ...@@ -2470,7 +2470,7 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceW(
debugstr_guid(InterfaceClassGuid), debugstr_w(ReferenceString), debugstr_guid(InterfaceClassGuid), debugstr_w(ReferenceString),
CreationFlags, DeviceInterfaceData); CreationFlags, DeviceInterfaceData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
...@@ -2593,7 +2593,7 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW( ...@@ -2593,7 +2593,7 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(
TRACE("%p %p %d %08x %p %p\n", DeviceInfoSet, DeviceInterfaceData, Reserved, TRACE("%p %p %d %08x %p %p\n", DeviceInfoSet, DeviceInterfaceData, Reserved,
samDesired, InfHandle, InfSectionName); samDesired, InfHandle, InfSectionName);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE || if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE ||
set->magic != SETUP_DEVICE_INFO_SET_MAGIC) set->magic != SETUP_DEVICE_INFO_SET_MAGIC)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -2666,7 +2666,7 @@ BOOL WINAPI SetupDiDeleteDeviceInterfaceRegKey( ...@@ -2666,7 +2666,7 @@ BOOL WINAPI SetupDiDeleteDeviceInterfaceRegKey(
TRACE("%p %p %d\n", DeviceInfoSet, DeviceInterfaceData, Reserved); TRACE("%p %p %d\n", DeviceInfoSet, DeviceInterfaceData, Reserved);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE || if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE ||
set->magic != SETUP_DEVICE_INFO_SET_MAGIC) set->magic != SETUP_DEVICE_INFO_SET_MAGIC)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -2738,7 +2738,7 @@ BOOL WINAPI SetupDiEnumDeviceInterfaces( ...@@ -2738,7 +2738,7 @@ BOOL WINAPI SetupDiEnumDeviceInterfaces(
TRACE("%p, %p, %s, %d, %p\n", DeviceInfoSet, DeviceInfoData, TRACE("%p, %p, %s, %d, %p\n", DeviceInfoSet, DeviceInfoData,
debugstr_guid(InterfaceClassGuid), MemberIndex, DeviceInterfaceData); debugstr_guid(InterfaceClassGuid), MemberIndex, DeviceInterfaceData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE || if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE ||
set->magic != SETUP_DEVICE_INFO_SET_MAGIC) set->magic != SETUP_DEVICE_INFO_SET_MAGIC)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -2828,7 +2828,7 @@ BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo) ...@@ -2828,7 +2828,7 @@ BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
BOOL ret = FALSE; BOOL ret = FALSE;
TRACE("%p\n", devinfo); TRACE("%p\n", devinfo);
if (devinfo && devinfo != (HDEVINFO)INVALID_HANDLE_VALUE) if (devinfo && devinfo != INVALID_HANDLE_VALUE)
{ {
struct DeviceInfoSet *list = (struct DeviceInfoSet *)devinfo; struct DeviceInfoSet *list = (struct DeviceInfoSet *)devinfo;
...@@ -2872,7 +2872,7 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA( ...@@ -2872,7 +2872,7 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(
DeviceInterfaceData, DeviceInterfaceDetailData, DeviceInterfaceData, DeviceInterfaceDetailData,
DeviceInterfaceDetailDataSize, RequiredSize, DeviceInfoData); DeviceInterfaceDetailDataSize, RequiredSize, DeviceInfoData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE || if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE ||
set->magic != SETUP_DEVICE_INFO_SET_MAGIC) set->magic != SETUP_DEVICE_INFO_SET_MAGIC)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -2945,7 +2945,7 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW( ...@@ -2945,7 +2945,7 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
DeviceInterfaceData, DeviceInterfaceDetailData, DeviceInterfaceData, DeviceInterfaceDetailData,
DeviceInterfaceDetailDataSize, RequiredSize, DeviceInfoData); DeviceInterfaceDetailDataSize, RequiredSize, DeviceInfoData);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE || if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE ||
set->magic != SETUP_DEVICE_INFO_SET_MAGIC) set->magic != SETUP_DEVICE_INFO_SET_MAGIC)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
...@@ -3676,7 +3676,7 @@ HKEY WINAPI SetupDiOpenDevRegKey( ...@@ -3676,7 +3676,7 @@ HKEY WINAPI SetupDiOpenDevRegKey(
TRACE("%p %p %d %d %d %x\n", DeviceInfoSet, DeviceInfoData, TRACE("%p %p %d %d %d %x\n", DeviceInfoSet, DeviceInfoData,
Scope, HwProfile, KeyType, samDesired); Scope, HwProfile, KeyType, samDesired);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
...@@ -3792,7 +3792,7 @@ BOOL WINAPI SetupDiDeleteDevRegKey( ...@@ -3792,7 +3792,7 @@ BOOL WINAPI SetupDiDeleteDevRegKey(
TRACE("%p %p %d %d %d\n", DeviceInfoSet, DeviceInfoData, Scope, HwProfile, TRACE("%p %p %d %d %d\n", DeviceInfoSet, DeviceInfoData, Scope, HwProfile,
KeyType); KeyType);
if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) if (!DeviceInfoSet || DeviceInfoSet == INVALID_HANDLE_VALUE)
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
......
...@@ -104,7 +104,7 @@ static RETERR16 get_last_error(void) ...@@ -104,7 +104,7 @@ static RETERR16 get_last_error(void)
RETERR16 WINAPI IpOpen16( LPCSTR filename, HINF16 *hinf16 ) RETERR16 WINAPI IpOpen16( LPCSTR filename, HINF16 *hinf16 )
{ {
HINF hinf = SetupOpenInfFileA( filename, NULL, INF_STYLE_WIN4, NULL ); HINF hinf = SetupOpenInfFileA( filename, NULL, INF_STYLE_WIN4, NULL );
if (hinf == (HINF)INVALID_HANDLE_VALUE) return get_last_error(); if (hinf == INVALID_HANDLE_VALUE) return get_last_error();
return alloc_hinf16( hinf, hinf16 ); return alloc_hinf16( hinf, hinf16 );
} }
......
...@@ -789,7 +789,7 @@ DWORD WINAPI RetreiveFileSecurity(LPCWSTR lpFileName, ...@@ -789,7 +789,7 @@ DWORD WINAPI RetreiveFileSecurity(LPCWSTR lpFileName,
DWORD dwSize = 0x100; DWORD dwSize = 0x100;
DWORD dwError; DWORD dwError;
SecDesc = (PSECURITY_DESCRIPTOR)MyMalloc(dwSize); SecDesc = MyMalloc(dwSize);
if (SecDesc == NULL) if (SecDesc == NULL)
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
...@@ -808,7 +808,7 @@ DWORD WINAPI RetreiveFileSecurity(LPCWSTR lpFileName, ...@@ -808,7 +808,7 @@ DWORD WINAPI RetreiveFileSecurity(LPCWSTR lpFileName,
return dwError; return dwError;
} }
SecDesc = (PSECURITY_DESCRIPTOR)MyRealloc(SecDesc, dwSize); SecDesc = MyRealloc(SecDesc, dwSize);
if (SecDesc == NULL) if (SecDesc == NULL)
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
......
...@@ -1082,7 +1082,7 @@ WCHAR *PARSER_get_dest_dir( INFCONTEXT *context ) ...@@ -1082,7 +1082,7 @@ WCHAR *PARSER_get_dest_dir( INFCONTEXT *context )
HINF WINAPI SetupOpenInfFileA( PCSTR name, PCSTR class, DWORD style, UINT *error ) HINF WINAPI SetupOpenInfFileA( PCSTR name, PCSTR class, DWORD style, UINT *error )
{ {
UNICODE_STRING nameW, classW; UNICODE_STRING nameW, classW;
HINF ret = (HINF)INVALID_HANDLE_VALUE; HINF ret = INVALID_HANDLE_VALUE;
classW.Buffer = NULL; classW.Buffer = NULL;
if (class && !RtlCreateUnicodeStringFromAsciiz( &classW, class )) if (class && !RtlCreateUnicodeStringFromAsciiz( &classW, class ))
...@@ -1112,11 +1112,11 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err ...@@ -1112,11 +1112,11 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err
if (strchrW( name, '\\' ) || strchrW( name, '/' )) if (strchrW( name, '\\' ) || strchrW( name, '/' ))
{ {
if (!(len = GetFullPathNameW( name, 0, NULL, NULL ))) return (HINF)INVALID_HANDLE_VALUE; if (!(len = GetFullPathNameW( name, 0, NULL, NULL ))) return INVALID_HANDLE_VALUE;
if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
{ {
SetLastError( ERROR_NOT_ENOUGH_MEMORY ); SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return (HINF)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
GetFullPathNameW( name, len, path, NULL ); GetFullPathNameW( name, len, path, NULL );
handle = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); handle = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
...@@ -1130,7 +1130,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err ...@@ -1130,7 +1130,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err
if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
{ {
SetLastError( ERROR_NOT_ENOUGH_MEMORY ); SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return (HINF)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
GetWindowsDirectoryW( path, len ); GetWindowsDirectoryW( path, len );
p = path + strlenW(path); p = path + strlenW(path);
...@@ -1153,7 +1153,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err ...@@ -1153,7 +1153,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err
if (!file) if (!file)
{ {
HeapFree( GetProcessHeap(), 0, path ); HeapFree( GetProcessHeap(), 0, path );
return (HINF)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
TRACE( "%s -> %p\n", debugstr_w(path), file ); TRACE( "%s -> %p\n", debugstr_w(path), file );
file->filename = path; file->filename = path;
...@@ -1171,7 +1171,7 @@ BOOL WINAPI SetupOpenAppendInfFileA( PCSTR name, HINF parent_hinf, UINT *error ) ...@@ -1171,7 +1171,7 @@ BOOL WINAPI SetupOpenAppendInfFileA( PCSTR name, HINF parent_hinf, UINT *error )
if (!name) return SetupOpenAppendInfFileW( NULL, parent_hinf, error ); if (!name) return SetupOpenAppendInfFileW( NULL, parent_hinf, error );
child_hinf = SetupOpenInfFileA( name, NULL, INF_STYLE_WIN4, error ); child_hinf = SetupOpenInfFileA( name, NULL, INF_STYLE_WIN4, error );
if (child_hinf == (HINF)INVALID_HANDLE_VALUE) return FALSE; if (child_hinf == INVALID_HANDLE_VALUE) return FALSE;
append_inf_file( parent_hinf, child_hinf ); append_inf_file( parent_hinf, child_hinf );
TRACE( "%p: appended %s (%p)\n", parent_hinf, debugstr_a(name), child_hinf ); TRACE( "%p: appended %s (%p)\n", parent_hinf, debugstr_a(name), child_hinf );
return TRUE; return TRUE;
...@@ -1196,14 +1196,14 @@ BOOL WINAPI SetupOpenAppendInfFileW( PCWSTR name, HINF parent_hinf, UINT *error ...@@ -1196,14 +1196,14 @@ BOOL WINAPI SetupOpenAppendInfFileW( PCWSTR name, HINF parent_hinf, UINT *error
sizeof(filename)/sizeof(WCHAR), NULL )) sizeof(filename)/sizeof(WCHAR), NULL ))
{ {
child_hinf = SetupOpenInfFileW( filename, NULL, INF_STYLE_WIN4, error ); child_hinf = SetupOpenInfFileW( filename, NULL, INF_STYLE_WIN4, error );
if (child_hinf == (HINF)INVALID_HANDLE_VALUE) return FALSE; if (child_hinf == INVALID_HANDLE_VALUE) return FALSE;
append_inf_file( parent_hinf, child_hinf ); append_inf_file( parent_hinf, child_hinf );
TRACE( "%p: appended %s (%p)\n", parent_hinf, debugstr_w(filename), child_hinf ); TRACE( "%p: appended %s (%p)\n", parent_hinf, debugstr_w(filename), child_hinf );
} }
return TRUE; return TRUE;
} }
child_hinf = SetupOpenInfFileW( name, NULL, INF_STYLE_WIN4, error ); child_hinf = SetupOpenInfFileW( name, NULL, INF_STYLE_WIN4, error );
if (child_hinf == (HINF)INVALID_HANDLE_VALUE) return FALSE; if (child_hinf == INVALID_HANDLE_VALUE) return FALSE;
append_inf_file( parent_hinf, child_hinf ); append_inf_file( parent_hinf, child_hinf );
TRACE( "%p: appended %s (%p)\n", parent_hinf, debugstr_w(name), child_hinf ); TRACE( "%p: appended %s (%p)\n", parent_hinf, debugstr_w(name), child_hinf );
return TRUE; return TRUE;
......
...@@ -426,7 +426,7 @@ HSPFILEQ WINAPI SetupOpenFileQueue(void) ...@@ -426,7 +426,7 @@ HSPFILEQ WINAPI SetupOpenFileQueue(void)
struct file_queue *queue; struct file_queue *queue;
if (!(queue = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*queue)))) if (!(queue = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*queue))))
return (HSPFILEQ)INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
return queue; return queue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment