Fix wrong exception handling 67/228067/1
authorJusung Son <jusung07.son@samsung.com>
Wed, 18 Mar 2020 23:54:27 +0000 (08:54 +0900)
committerJusung Son <jusung07.son@samsung.com>
Wed, 18 Mar 2020 23:54:27 +0000 (08:54 +0900)
Change-Id: Idda7c53165267adbe52885a6118f918475093375
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
src/rpc-port-parcel.cc

index 38b158b..f906779 100644 (file)
@@ -221,7 +221,7 @@ RPC_API int rpc_port_parcel_write(rpc_port_parcel_h h,
   if (parcelable == nullptr || parcelable->to == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
-  if (h == nullptr || data == nullptr)
+  if (h == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   parcelable->to(h, data);
@@ -345,7 +345,7 @@ RPC_API int rpc_port_parcel_read(rpc_port_parcel_h h,
   if (parcelable == nullptr || parcelable->from == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
-  if (h == nullptr || data == nullptr)
+  if (h == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   parcelable->from(h, data);