Fix handling GVariant byte array
[platform/core/connectivity/zigbee-manager.git] / zigbee-daemon / zigbee-interface / src / zigbee_service_interface_common.c
index 1c0a2bf..e967880 100644 (file)
@@ -72,19 +72,15 @@ void zigbee_service_dbus_interface_destroy_resp_cb_data(ZigbeeServiceInterfaceRe
 
 void *zigbee_service_dbus_interface_ref_interface_object(ZigbeeServiceInterfaceRespCbData_t *resp_cb_data)
 {
-       if (resp_cb_data)
-               return resp_cb_data->interface_object;
-
-       return NULL;
+       zblib_check_null_ret_error("resp_cb_data", resp_cb_data, NULL);
+       return resp_cb_data->interface_object;
 }
 
 GDBusMethodInvocation *
 zigbee_service_dbus_interface_ref_invocation(ZigbeeServiceInterfaceRespCbData_t *resp_cb_data)
 {
-       if (resp_cb_data)
-               return resp_cb_data->invocation;
-
-       return NULL;
+       zblib_check_null_ret_error("resp_cb_data", resp_cb_data, NULL);
+       return resp_cb_data->invocation;
 }
 
 gboolean zigbee_service_dbus_interface_dispatch_request(ZigBeeServiceInterface *service_interface,