Fix Coverty Issues 74/286674/1
authorAnuj Kumar Singh <anujk.singh@samsung.com>
Wed, 11 Jan 2023 11:01:04 +0000 (16:31 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Wed, 11 Jan 2023 12:55:00 +0000 (18:25 +0530)
This patch fixes following covery issues:
CID-1619563
CID-1619564

Change-Id: Idcc24b7a3696bcad14ba98d0d7eead2605613eaa
Signed-off-by: Anuj Kumar Singh <anujk.singh@samsung.com>
bt-api/bt-dpm.c

index bc885c0..d67bec1 100644 (file)
@@ -84,8 +84,6 @@ static bt_dpm_status_e _bt_check_dpm_blocklist_device(bluetooth_device_address_t
                        (unsigned char *)dev_list.addresses[i].addr);
                        if (g_strcmp0(device_address, temp_address) == 0)
                                return BT_DPM_RESTRICTED;
-                       else
-                               return BT_DPM_ALLOWED;
                }
        } else {
                return BT_DPM_NO_SERVICE;
@@ -108,8 +106,6 @@ static bt_dpm_status_e _bt_check_dpm_blocklist_uuid(char *uuid)
                for (i = 0; i < uuid_list.count; i++) {
                        if (g_strcmp0(uuid, uuid_list.uuids[i]) == 0)
                                return BT_DPM_RESTRICTED;
-                       else
-                               return BT_DPM_ALLOWED;
                }
        } else {
                return BT_DPM_NO_SERVICE;