Fix Coverity Issue 07/294507/1 accepted/tizen/unified/20230628.155142
authorAnuj Kumar Singh <anujk.singh@samsung.com>
Tue, 20 Jun 2023 08:40:26 +0000 (14:10 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Tue, 20 Jun 2023 08:40:26 +0000 (14:10 +0530)
This patch fix the below coverity issue:
CID-1665400

Change-Id: Ia07c7af202303a4fbd48ae888aa4c5e07c6ee056
Signed-off-by: Anuj Kumar Singh <anujk.singh@samsung.com>
bt-service/services/bt-service-battery-monitor.c

index 4770c16..5dbab52 100644 (file)
@@ -424,7 +424,7 @@ void _bt_bm_remove_scan_app(bt_bm_scan_type_e type, uid_t uid, pid_t pid)
                scan_info = (bt_bm_scan_info_t *)(app_list->data);
 
                if (scan_info->type == SCAN_BOTH) {
-                       scan_info->type = (scan_info->type == SCAN_REGACY) ? SCAN_LE : SCAN_REGACY;
+                       scan_info->type = (type == SCAN_REGACY) ? SCAN_LE : SCAN_REGACY;
                        return;
                }