Skip to content

Commit 674056f

Browse files
expliyhhyson710
authored andcommitted
hfp-ag:fix coverity issue
bug: v/75709 bug: v/75708: bug: v/75707: bug: v/75706: bug: v/75705 fix coverity issue Signed-off-by: JerryWang<[email protected]>
1 parent 4d7617c commit 674056f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

service/profiles/hfp_ag/hfp_ag_tele_phone_service.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,25 +232,25 @@ static void radio_power_changed(bool state)
232232
BT_LOGD("%s,%d\n", __func__, state);
233233
}
234234

235-
static void call_state_changed(tapi_call_info call_info)
235+
static void call_state_changed(tapi_call_info* call_info)
236236
{
237237
tapi_call_info* call = NULL;
238-
tapi_call_info* exist_call = bt_list_find(g_current_calls, call_is_found, &call_info);
238+
tapi_call_info* exist_call = bt_list_find(g_current_calls, call_is_found, call_info);
239239

240240
BT_LOGD("%s\n", __func__);
241241

242-
dump_call(&call_info);
242+
dump_call(call_info);
243243

244244
if (exist_call != NULL)
245245
bt_list_remove(g_current_calls, exist_call);
246246

247-
if (bt_list_is_empty(g_current_calls) && call_info.state == CALL_STATUS_DISCONNECTED) {
248-
update_call_state(&call_info);
247+
if (bt_list_is_empty(g_current_calls) && call_info->state == CALL_STATUS_DISCONNECTED) {
248+
update_call_state(call_info);
249249
}
250250

251-
if (call_info.state != CALL_STATUS_DISCONNECTED) {
251+
if (call_info->state != CALL_STATUS_DISCONNECTED) {
252252
call = (tapi_call_info*)calloc(1, sizeof(tapi_call_info));
253-
memcpy(call, &call_info, sizeof(tapi_call_info));
253+
memcpy(call, call_info, sizeof(tapi_call_info));
254254
bt_list_add_tail(g_current_calls, call);
255255
update_call_state(call);
256256
}

0 commit comments

Comments
 (0)