Connor McAdams (@cmcadams) commented about dlls/setupapi/tests/devinst.c:
{
DWORD i; if (!memcmp(&keys[n], &DEVPKEY_Device_FriendlyName, sizeof(keys[n])))
{ keys_len++;
continue;
}
for (i = 0; i < ARRAY_SIZE(default_keys); i++)
{
if (!memcmp(&keys[n], &default_keys[i], sizeof(keys[n])))
{
keys_len++;
break;
}
} }
This loop in general feels a little clunky, is it possible to recreate the device we're testing/delete the key we've set for the device in prior tests, and then do a separate for loop so that we're only checking the default built-in keys? I think that'd make it clearer what the built-in keys are, and simplify this loop a bit.