diff options
author | himanshu <h.himanshu@samsung.com> | 2020-02-13 19:14:58 +0530 |
---|---|---|
committer | himanshu <h.himanshu@samsung.com> | 2020-02-13 19:14:58 +0530 |
commit | fecc0c9b11b212cb27b1d6c2118c97aebd757e3a (patch) | |
tree | 9bd0f502192848d0325a5ee03cb2c1e24c6d9194 | |
parent | 60443469e61d74a0f3bd8ad6565d8c00bda8779f (diff) | |
download | bluetooth-fecc0c9b11b212cb27b1d6c2118c97aebd757e3a.tar.gz bluetooth-fecc0c9b11b212cb27b1d6c2118c97aebd757e3a.tar.bz2 bluetooth-fecc0c9b11b212cb27b1d6c2118c97aebd757e3a.zip |
Fix coverity issue: declaration hides parameter
The data used in the BT_UNIT_TEST_FUNCTION_ADAPTER_READ_BATTERY_INFO
test case conflicts with the declared parameter "data" in the
test_input_callback function.
Change-Id: I51f80732880b631995c4fa3bc52ae390d13d8fc2
Signed-off-by: himanshu <h.himanshu@samsung.com>
-rw-r--r-- | test/bt_unit_test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/bt_unit_test.c b/test/bt_unit_test.c index b7e6a48..916d08a 100644 --- a/test/bt_unit_test.c +++ b/test/bt_unit_test.c @@ -4374,21 +4374,21 @@ int test_input_callback(void *data) break; } case BT_UNIT_TEST_FUNCTION_ADAPTER_READ_BATTERY_INFO: { - bt_battery_info_s data; - memset(&data, 0, sizeof(bt_battery_info_s)); - ret = bt_adapter_read_battery_info(&data); + bt_battery_info_s battery_data; + memset(&battery_data, 0, sizeof(bt_battery_info_s)); + ret = bt_adapter_read_battery_info(&battery_data); if (ret < 0) { TC_PRT("returns %s\n", __bt_get_error_message(ret)); } else { - TC_PRT("Battery data: %ld %ld %d %d", data.session_start_time, - data.session_end_time, data.session_scan_time, data.session_connected_time); - if(data.atm_list == NULL) { + TC_PRT("Battery data: %ld %ld %d %d", battery_data.session_start_time, + battery_data.session_end_time, battery_data.session_scan_time, battery_data.session_connected_time); + if(battery_data.atm_list == NULL) { TC_PRT("No data transaction in this session"); break; } TC_PRT("Displaying app-wise transaction details"); - for (GSList *l = data.atm_list; l != NULL; l = g_slist_next(l)) { + for (GSList *l = battery_data.atm_list; l != NULL; l = g_slist_next(l)) { bt_battery_app_info_s *t = (bt_battery_app_info_s *)(l->data); TC_PRT("uid: %ld, pid: %ld, received bytes: %d, sent bytes: %d, time: %u", (long int)(t->uid), (long int)(t->pid), t->rx_bytes, t->tx_bytes, t->time); |