From bbee06574487c9d8ea5bf7a196105bf10e0288aa Mon Sep 17 00:00:00 2001 From: "Hongkuk, Son" Date: Wed, 14 Dec 2016 13:49:41 +0900 Subject: [PATCH] d2d-conv-manager: fix svace_2.2 issues UNINIT.LOCAL_VAR.EX UNREACHABLE_CODE Signed-off-by: Hongkuk, Son Change-Id: Ib354678063945081170e66eba20e58297ace2a5d --- daemon/service_provider/RemoteAppControlServiceProvider.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/daemon/service_provider/RemoteAppControlServiceProvider.cpp b/daemon/service_provider/RemoteAppControlServiceProvider.cpp index 059b7fe..3000181 100755 --- a/daemon/service_provider/RemoteAppControlServiceProvider.cpp +++ b/daemon/service_provider/RemoteAppControlServiceProvider.cpp @@ -590,10 +590,10 @@ void conv::RemoteAppControlServiceProvider::__iotcon_request_cb(iotcon_resource_ return; CATCH: - iotcon_attributes_h attributes; - iotcon_representation_h responseRep; + iotcon_attributes_h attributes = NULL; + iotcon_representation_h responseRep = NULL; iotcon_representation_create(&responseRep); - iotcon_attributes_h responseAttributes; + iotcon_attributes_h responseAttributes = NULL; iotcon_attributes_create(&responseAttributes); if (reqRep != NULL) { @@ -974,10 +974,7 @@ CATCH: if (appctl_request_char) { payload.set(NULL, CONV_JSON_APP_CONTROL_REQUEST, appctl_request_char); } - if (appcontrol_result == IOTCON_ERROR_NONE) { - payload.set(NULL, CONV_JSON_APP_CONTROL_RESULT, resultStr.c_str()); - } - payload.set(NULL, CONV_JSON_APP_CONTROL_RESULT, resultStr.c_str()); + result.set(NULL, CONV_JSON_DESCRIPTION, cb_info.requestObj->getDescription()); result.set(NULL, CONV_JSON_PAYLOAD, payload); -- 2.7.4