Commit d6359edd authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shlwapi: Remove break after return (Smatch).

parent 095d068c
...@@ -627,7 +627,31 @@ static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This, ...@@ -627,7 +627,31 @@ static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This,
if (!pszExtra) if (!pszExtra)
{ {
hr = ASSOC_GetValue(hkeyShell, &pszExtraFromReg); hr = ASSOC_GetValue(hkeyShell, &pszExtraFromReg);
if (FAILED(hr)) /* if no default action */
if (hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))
{
DWORD rlen;
ret = RegQueryInfoKeyW(hkeyShell, 0, 0, 0, 0, &rlen, 0, 0, 0, 0, 0, 0);
if (ret != ERROR_SUCCESS)
{
RegCloseKey(hkeyShell);
return HRESULT_FROM_WIN32(ret);
}
rlen++;
pszExtraFromReg = HeapAlloc(GetProcessHeap(), 0, rlen * sizeof(WCHAR));
if (!pszExtraFromReg)
{
RegCloseKey(hkeyShell);
return E_OUTOFMEMORY;
}
ret = RegEnumKeyExW(hkeyShell, 0, pszExtraFromReg, &rlen, 0, NULL, NULL, NULL);
if (ret != ERROR_SUCCESS)
{
RegCloseKey(hkeyShell);
return HRESULT_FROM_WIN32(ret);
}
}
else if (FAILED(hr))
{ {
RegCloseKey(hkeyShell); RegCloseKey(hkeyShell);
return hr; return hr;
...@@ -743,7 +767,6 @@ static HRESULT WINAPI IQueryAssociations_fnGetString( ...@@ -743,7 +767,6 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(
return hr; return hr;
len++; len++;
return ASSOC_ReturnData(pszOut, pcchOut, path, len); return ASSOC_ReturnData(pszOut, pcchOut, path, len);
break;
} }
case ASSOCSTR_FRIENDLYAPPNAME: case ASSOCSTR_FRIENDLYAPPNAME:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment