Fix svace 2.2 issues 07/102607/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 07:49:31 +0000 (16:49 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 07:49:31 +0000 (16:49 +0900)
Change-Id: Ic4b27a4cc8e0d5f4a5e828eaedb5297aa7e5ec46
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-core/bt-core-noti-handler.c
bt-service/bt-service-device.c

index 9860f5d..fcb450d 100644 (file)
@@ -328,16 +328,16 @@ void _bt_core_handle_flight_mode_noti(void)
 void _bt_core_handle_power_saving_mode_noti(void)
 {
 #ifndef TIZEN_PROFILE_WEARABLE
-       int ret = 0;
-
        BT_DBG("+");
 #ifdef ENABLE_TIZEN_2_4
+       int ret = 0;
+
        ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_PSMODE,
                        (vconf_callback_fn)__bt_core_power_saving_mode_cb, NULL);
-#endif
        if (ret < 0)
                BT_ERR("Unable to register key handler");
 #endif
+#endif
 }
 
 void _bt_core_unregister_vconf_handler(void)
index ef146ab..8c0b786 100644 (file)
@@ -1932,10 +1932,10 @@ static int __bt_connect_le_device_internal(int req_id, const bluetooth_device_ad
 fail:
        if (device_proxy)
                g_object_unref(device_proxy);
-       if (func_data) {
-               g_free(func_data->address);
-               g_free(func_data);
-       }
+
+       g_free(func_data->address);
+       g_free(func_data);
+
        return ret;
 }
 
@@ -2043,10 +2043,10 @@ int _bt_disconnect_le_device(int req_id,
 fail:
        if (device_proxy)
                g_object_unref(device_proxy);
-       if (func_data) {
-               g_free(func_data->address);
-               g_free(func_data);
-       }
+
+       g_free(func_data->address);
+       g_free(func_data);
+
        return ret;
 }