Hans Leidekker : webservices: Simplify WsAddressMessage.
Alexandre Julliard
julliard at winehq.org
Wed Sep 25 16:45:19 CDT 2019
Module: wine
Branch: master
Commit: fe9a28e819f81190a8938e1729c05de291e894d1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fe9a28e819f81190a8938e1729c05de291e894d1
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Sep 25 14:29:56 2019 +0200
webservices: Simplify WsAddressMessage.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/webservices/msg.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index ed9394ef22..d6906cb5de 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -452,16 +452,13 @@ 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
+ else if (addr && addr->url.length)
{
- if (addr && addr->url.length)
+ if (!(msg->addr.chars = heap_alloc( addr->url.length * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
+ else
{
- if (!(msg->addr.chars = heap_alloc( addr->url.length * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
- else
- {
- memcpy( msg->addr.chars, addr->url.chars, addr->url.length * sizeof(WCHAR) );
- msg->addr.length = addr->url.length;
- }
+ memcpy( msg->addr.chars, addr->url.chars, addr->url.length * sizeof(WCHAR) );
+ msg->addr.length = addr->url.length;
}
}
if (hr == S_OK) msg->is_addressed = TRUE;
More information about the wine-cvs
mailing list