16 Nov
2024
16 Nov
'24
5:35 a.m.
Jinoh Kang (@iamahuman) commented about dlls/mmdevapi/devenum.c:
break; } RegCloseKey(regkey); + + /* Special case ContainerID as CLSID */ + if(pv->vt == VT_BLOB && pv->blob.pBlobData && pv->blob.cbSize == 24 && pv->blob.pBlobData[0] == VT_CLSID && IsEqualPropertyKey(*key, DEVPKEY_Device_ContainerId)) {
Avoid hard-coding constants wherever possible. ```suggestion:-0+0 if(pv->vt == VT_BLOB && pv->blob.pBlobData && pv->blob.cbSize == sizeof(VARIANT) && pv->blob.pBlobData[0] == VT_CLSID && IsEqualPropertyKey(*key, DEVPKEY_Device_ContainerId)) { ``` (Assuming this is VARIANT; correct me if this is not the case.) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/359#note_87710