Fix coverity issue : unchecked return value 70/224870/1
authorhimanshu <h.himanshu@samsung.com>
Thu, 13 Feb 2020 12:33:31 +0000 (18:03 +0530)
committerhimanshu <h.himanshu@samsung.com>
Thu, 13 Feb 2020 12:33:31 +0000 (18:03 +0530)
Return value of __bt_call_systemact_service
was not checked.

Change-Id: I6c9bccd246a43f5901036e10c292b92e8f13eb05
Signed-off-by: himanshu <h.himanshu@samsung.com>
bt-core/bt-core-adapter.c

index 27fdeaf..47bd80b 100644 (file)
@@ -795,13 +795,18 @@ gboolean _bt_core_set_transfer_value(gboolean value)
 
 gboolean _bt_core_factory_test_mode(const char *type, const char *arg)
 {
+       int ret;
        BT_DBG("Test item : %s", type);
 
 #ifdef TIZEN_FEATURE_ACTD
        if (g_strcmp0(type, "Enable_RF_Test") == 0) {
-               __bt_call_systemact_service(BT_SYSTEMACT_EDUTM_ON);
+               ret = __bt_call_systemact_service(BT_SYSTEMACT_EDUTM_ON);
+               if (ret < 0)
+                       BT_ERR("Failed to call systemact service");
        } else if (g_strcmp0(type, "Disable_RF_Test") == 0) {
-               __bt_call_systemact_service(BT_SYSTEMACT_EDUTM_OFF);
+               ret = __bt_call_systemact_service(BT_SYSTEMACT_EDUTM_OFF);
+               if (ret < 0)
+                       BT_ERR("Failed to call systemact service");
        } else {
                BT_DBG("Terminate bt-core process");
                g_timeout_add(BT_CORE_IDLE_TERM_TIME, __bt_core_idle_terminate, NULL);