Rémi Bernon : windows.media.speech: Initialize HRESULT variables consistently.
Alexandre Julliard
julliard at winehq.org
Wed Apr 27 16:12:14 CDT 2022
Module: wine
Branch: master
Commit: 8992e20898190d7db0452589cbf20624bd15e416
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8992e20898190d7db0452589cbf20624bd15e416
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Mon Apr 25 17:33:02 2022 +0200
windows.media.speech: Initialize HRESULT variables consistently.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/windows.media.speech/async.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/dlls/windows.media.speech/async.c b/dlls/windows.media.speech/async.c
index bc5d4fa40ed..3b532502ea2 100644
--- a/dlls/windows.media.speech/async.c
+++ b/dlls/windows.media.speech/async.c
@@ -176,16 +176,13 @@ static HRESULT WINAPI async_operation_get_Completed( IAsyncOperation_IInspectabl
IAsyncOperationCompletedHandler_IInspectable **handler )
{
struct async_operation *impl = impl_from_IAsyncOperation_IInspectable(iface);
- HRESULT hr;
+ HRESULT hr = S_OK;
FIXME("iface %p, handler %p semi stub!\n", iface, handler);
EnterCriticalSection(&impl->cs);
if (impl->status == Closed)
hr = E_ILLEGAL_METHOD_CALL;
- else
- hr = S_OK;
-
*handler = (impl->handler != HANDLER_NOT_SET) ? impl->handler : NULL;
LeaveCriticalSection(&impl->cs);
@@ -249,16 +246,13 @@ static HRESULT WINAPI async_operation_info_get_Id( IAsyncInfo *iface, UINT32 *id
static HRESULT WINAPI async_operation_info_get_Status( IAsyncInfo *iface, AsyncStatus *status )
{
struct async_operation *impl = impl_from_IAsyncInfo(iface);
- HRESULT hr;
+ HRESULT hr = S_OK;
TRACE("iface %p, status %p.\n", iface, status);
EnterCriticalSection(&impl->cs);
if (impl->status == Closed)
hr = E_ILLEGAL_METHOD_CALL;
- else
- hr = S_OK;
-
*status = impl->status;
LeaveCriticalSection(&impl->cs);
@@ -285,10 +279,9 @@ static HRESULT WINAPI async_operation_info_get_ErrorCode( IAsyncInfo *iface, HRE
static HRESULT WINAPI async_operation_info_Cancel( IAsyncInfo *iface )
{
struct async_operation *impl = impl_from_IAsyncInfo(iface);
- HRESULT hr;
+ HRESULT hr = S_OK;
TRACE("iface %p.\n", iface);
- hr = S_OK;
EnterCriticalSection(&impl->cs);
if (impl->status == Closed)
More information about the wine-cvs
mailing list