Commit 72fdb743 authored by Alexandre Julliard's avatar Alexandre Julliard

setupapi: Don't use 'interface' as variable name, since it can be defined to a keyword.

parent 0a81b788
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "wine/list.h" #include "wine/list.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "cfgmgr32.h" #include "cfgmgr32.h"
#include "initguid.h"
#include "winioctl.h" #include "winioctl.h"
#include "rpc.h" #include "rpc.h"
#include "rpcdce.h" #include "rpcdce.h"
...@@ -181,7 +180,7 @@ static void SETUPDI_FreeInterfaceInstances(struct InterfaceInstances *instances) ...@@ -181,7 +180,7 @@ static void SETUPDI_FreeInterfaceInstances(struct InterfaceInstances *instances)
* Returns FALSE if not found. * Returns FALSE if not found.
*/ */
static BOOL SETUPDI_FindInterface(const struct DeviceInfo *devInfo, static BOOL SETUPDI_FindInterface(const struct DeviceInfo *devInfo,
const GUID *InterfaceClassGuid, struct InterfaceInstances **interface) const GUID *InterfaceClassGuid, struct InterfaceInstances **iface_ret)
{ {
BOOL found = FALSE; BOOL found = FALSE;
struct InterfaceInstances *iface; struct InterfaceInstances *iface;
...@@ -193,12 +192,12 @@ static BOOL SETUPDI_FindInterface(const struct DeviceInfo *devInfo, ...@@ -193,12 +192,12 @@ static BOOL SETUPDI_FindInterface(const struct DeviceInfo *devInfo,
{ {
if (IsEqualGUID(&iface->guid, InterfaceClassGuid)) if (IsEqualGUID(&iface->guid, InterfaceClassGuid))
{ {
*interface = iface; *iface_ret = iface;
found = TRUE; found = TRUE;
break; break;
} }
} }
TRACE("returning %d (%p)\n", found, found ? *interface : NULL); TRACE("returning %d (%p)\n", found, found ? *iface_ret : NULL);
return found; return found;
} }
...@@ -1985,7 +1984,7 @@ end: ...@@ -1985,7 +1984,7 @@ end:
} }
static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key, static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
const GUID *interface) const GUID *guid)
{ {
DWORD i, len; DWORD i, len;
WCHAR subKeyName[MAX_PATH]; WCHAR subKeyName[MAX_PATH];
...@@ -2003,8 +2002,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key, ...@@ -2003,8 +2002,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
if (*subKeyName == '#') if (*subKeyName == '#')
{ {
/* The subkey name is the reference string, with a '#' prepended */ /* The subkey name is the reference string, with a '#' prepended */
SETUPDI_AddInterfaceInstance(dev, interface, subKeyName + 1, SETUPDI_AddInterfaceInstance(dev, guid, subKeyName + 1, &iface);
&iface);
l = RegOpenKeyExW(key, subKeyName, 0, KEY_READ, &subKey); l = RegOpenKeyExW(key, subKeyName, 0, KEY_READ, &subKey);
if (!l) if (!l)
{ {
...@@ -2027,7 +2025,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key, ...@@ -2027,7 +2025,7 @@ static void SETUPDI_AddDeviceInterfaces(SP_DEVINFO_DATA *dev, HKEY key,
} }
static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet, static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
HKEY key, const GUID *interface, LPCWSTR enumstr) HKEY key, const GUID *guid, LPCWSTR enumstr)
{ {
struct DeviceInfoSet *set = DeviceInfoSet; struct DeviceInfoSet *set = DeviceInfoSet;
DWORD i, len; DWORD i, len;
...@@ -2085,8 +2083,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet, ...@@ -2085,8 +2083,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
if (SETUPDI_AddDeviceToSet(set, &deviceClass, if (SETUPDI_AddDeviceToSet(set, &deviceClass,
0 /* FIXME: DevInst */, deviceInst, 0 /* FIXME: DevInst */, deviceInst,
FALSE, &dev)) FALSE, &dev))
SETUPDI_AddDeviceInterfaces(dev, subKey, SETUPDI_AddDeviceInterfaces(dev, subKey, guid);
interface);
} }
RegCloseKey(deviceKey); RegCloseKey(deviceKey);
} }
...@@ -2103,12 +2100,12 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet, ...@@ -2103,12 +2100,12 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
} }
static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet, static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet,
const GUID *interface, LPCWSTR enumstr, DWORD flags) const GUID *guid, LPCWSTR enumstr, DWORD flags)
{ {
HKEY interfacesKey = SetupDiOpenClassRegKeyExW(interface, KEY_READ, HKEY interfacesKey = SetupDiOpenClassRegKeyExW(guid, KEY_READ,
DIOCR_INTERFACE, NULL, NULL); DIOCR_INTERFACE, NULL, NULL);
TRACE("%p, %s, %s, %08x\n", DeviceInfoSet, debugstr_guid(interface), TRACE("%p, %s, %s, %08x\n", DeviceInfoSet, debugstr_guid(guid),
debugstr_w(enumstr), flags); debugstr_w(enumstr), flags);
if (interfacesKey != INVALID_HANDLE_VALUE) if (interfacesKey != INVALID_HANDLE_VALUE)
...@@ -2152,7 +2149,7 @@ static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet, ...@@ -2152,7 +2149,7 @@ static void SETUPDI_EnumerateInterfaces(HDEVINFO DeviceInfoSet,
* interface's key, so just pass that long * interface's key, so just pass that long
*/ */
SETUPDI_EnumerateMatchingInterfaces(DeviceInfoSet, SETUPDI_EnumerateMatchingInterfaces(DeviceInfoSet,
interfacesKey, interface, enumstr); interfacesKey, guid, enumstr);
} }
RegCloseKey(interfacesKey); RegCloseKey(interfacesKey);
} }
......
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