Esme Povirk (@madewokherd) commented about dlls/windowscodecs/metadataquery.c:
const WCHAR *value = query_get_guid_item_string(buffer, ARRAY_SIZE(buffer), var->puuid, false);
if (!(*name = wcsdup(value)))
return E_OUTOFMEMORY;
return S_OK;
- }
- PropVariantInit(&dest);
- type = get_type_name(var->vt);
- if (type)
- {
if (FAILED(hr = PropVariantChangeType(&dest, var, 0, VT_LPWSTR))) return hr;
- }
- len = 4;
- if (type) len += wcslen(type);
- if (dest.pwszVal) len += wcslen(dest.pwszVal);
I think this is equivalent to `if (type)` and can be combined with the previous line? If it's not, we'll have problems later when formatting a string with `dest.pwszVal`.