Connor McAdams (@cmcadams) commented about dlls/setupapi/devinst.c:
*prop_type = DEVPROP_TYPE_STRING;
if (buf_size >= size)
wcscpy( (WCHAR *)buf, device->instanceId );
else
ret = ERROR_INSUFFICIENT_BUFFER;
if (req_size)
*req_size = size;
- }
- else if (IsEqualDevPropKey( *prop_key, DEVPKEY_Device_ContainerId ))
return get_device_property( device, devinfo, device_data, &DEVPKEY_Device_BaseContainerId, prop_type, buf,
buf_size, req_size, flags );
- else
ret = get_device_reg_property( device->key, prop_key, prop_type, buf, buf_size, req_size, flags );
- return ret;
+}
```suggestion:-6+0 else if (IsEqualDevPropKey( *prop_key, DEVPKEY_Device_ContainerId )) ret = get_device_property( device, devinfo, device_data, &DEVPKEY_Device_BaseContainerId, prop_type, buf, buf_size, req_size, flags ); else ret = get_device_reg_property( device->key, prop_key, prop_type, buf, buf_size, req_size, flags ); return ret; } ``` If we're going to do `return ret;` at the end, might as well set `ret` in the `get_device_property()` case, unless I'm missing something.