webservices: Simplify WsAddressMessage.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2019-09-25 14:29:56 +02:00 committed by Alexandre Julliard
parent ffd4caa5f0
commit fe9a28e819
1 changed files with 5 additions and 8 deletions

View File

@ -452,9 +452,7 @@ HRESULT WINAPI WsAddressMessage( WS_MESSAGE *handle, const WS_ENDPOINT_ADDRESS *
}
if (msg->state < WS_MESSAGE_STATE_INITIALIZED || msg->is_addressed) hr = WS_E_INVALID_OPERATION;
else
{
if (addr && addr->url.length)
else if (addr && addr->url.length)
{
if (!(msg->addr.chars = heap_alloc( addr->url.length * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
else
@ -463,7 +461,6 @@ HRESULT WINAPI WsAddressMessage( WS_MESSAGE *handle, const WS_ENDPOINT_ADDRESS *
msg->addr.length = addr->url.length;
}
}
}
if (hr == S_OK) msg->is_addressed = TRUE;
LeaveCriticalSection( &msg->cs );