Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
while (!NtEnumerateKey( pci_key, i++, KeyBasicInformation, key2, sizeof(buffer), &size ))
{
unsigned int j = 0;
if (!(device_key = reg_open_key( pci_key, key2->Name, key2->NameLength )))
continue;
while (!NtEnumerateKey( device_key, j++, KeyBasicInformation, key2, sizeof(buffer), &size ))
{
if (!(gpu_key = reg_open_key( device_key, key2->Name, key2->NameLength )))
continue;
size = query_reg_value( gpu_key, class_guidW, value, sizeof(buffer) );
if (size != sizeof(guid_devclass_displayW)
|| wcscmp( (WCHAR *)value->Data, guid_devclass_displayW )
|| !(gpu = calloc( 1, sizeof(*gpu) )))
Let's move the "!(gpu = calloc( 1, sizeof(*gpu) ))" branch to a separate if statement, even if it uses more code. I think it's easier to follow in that way.