[DXDIAGN] Sync with Wine 3.0. CORE-14225

This commit is contained in:
Amine Khaldi 2018-01-21 22:29:51 +01:00
parent 2fe88c2edd
commit 92f11cd7c0
3 changed files with 3 additions and 260 deletions

View file

@ -155,14 +155,6 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
if (NULL == tmp) return E_FAIL;
lstrcpynW(tmp, pwszContainer, tmp_len);
/* special handling for an empty string and leaf container */
if (!tmp[0] && list_empty(&pContainer->subContainers)) {
hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, pContainer, This->pProv, (void **)ppInstance);
if (SUCCEEDED(hr))
TRACE("Succeeded in getting the container instance\n");
goto out;
}
cur = strchrW(tmp, '.');
while (NULL != cur) {
*cur = '\0'; /* cut tmp string to '.' */
@ -170,7 +162,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
TRACE("Trying to get parent container %s\n", debugstr_w(tmp));
hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer);
if (FAILED(hr))
goto out;
goto on_error;
cur++; /* go after '.' (just replaced by \0) */
tmp = cur;
cur = strchrW(tmp, '.');
@ -184,7 +176,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
TRACE("Succeeded in getting the container instance\n");
}
out:
on_error:
HeapFree(GetProcessHeap(), 0, orig_tmp);
return hr;
}