rpcrt4: Remove redundant NULL check before RpcStringFree (Smatch).

Michael Stefaniuc mstefani at redhat.de
Mon Feb 2 17:38:29 CST 2009


Casts aren't needed as the arguments passed to RpcStringFreeA already
have the right type.
---
 dlls/rpcrt4/rpc_binding.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index 696887c..43dbf9b 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -661,11 +661,11 @@ RPC_STATUS WINAPI RpcStringBindingParseA( RPC_CSTR StringBinding, RPC_CSTR *ObjU
   return RPC_S_OK;
 
 fail:
-  if (ObjUuid) RpcStringFreeA((unsigned char**)ObjUuid);
-  if (Protseq) RpcStringFreeA((unsigned char**)Protseq);
-  if (NetworkAddr) RpcStringFreeA((unsigned char**)NetworkAddr);
-  if (Endpoint) RpcStringFreeA((unsigned char**)Endpoint);
-  if (Options) RpcStringFreeA((unsigned char**)Options);
+  RpcStringFreeA(ObjUuid);
+  RpcStringFreeA(Protseq);
+  RpcStringFreeA(NetworkAddr);
+  RpcStringFreeA(Endpoint);
+  RpcStringFreeA(Options);
   return RPC_S_INVALID_STRING_BINDING;
 }
 
@@ -770,11 +770,11 @@ RPC_STATUS WINAPI RpcStringBindingParseW( RPC_WSTR StringBinding, RPC_WSTR *ObjU
   return RPC_S_OK;
 
 fail:
-  if (ObjUuid) RpcStringFreeW(ObjUuid);
-  if (Protseq) RpcStringFreeW(Protseq);
-  if (NetworkAddr) RpcStringFreeW(NetworkAddr);
-  if (Endpoint) RpcStringFreeW(Endpoint);
-  if (Options) RpcStringFreeW(Options);
+  RpcStringFreeW(ObjUuid);
+  RpcStringFreeW(Protseq);
+  RpcStringFreeW(NetworkAddr);
+  RpcStringFreeW(Endpoint);
+  RpcStringFreeW(Options);
   return RPC_S_INVALID_STRING_BINDING;
 }
 
-- 
1.6.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090203/05774129/attachment.pgp 


More information about the wine-patches mailing list