atmodem: use ofono_call initializer

This commit is contained in:
Lucas De Marchi 2011-02-01 15:12:44 -02:00 committed by Marcel Holtmann
parent 80a257098a
commit 730891328c
2 changed files with 6 additions and 2 deletions

View File

@ -132,10 +132,12 @@ GSList *at_util_parse_clcc(GAtResult *result)
if (g_at_result_iter_next_string(&iter, &str))
g_at_result_iter_next_number(&iter, &number_type);
call = g_try_new0(struct ofono_call, 1);
call = g_try_new(struct ofono_call, 1);
if (call == NULL)
break;
ofono_call_init(call);
call->id = id;
call->direction = dir;
call->status = status;

View File

@ -112,10 +112,12 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
struct ofono_call *call;
/* Generate a call structure for the waiting call */
call = g_try_new0(struct ofono_call, 1);
call = g_try_new(struct ofono_call, 1);
if (call == NULL)
return NULL;
ofono_call_init(call);
call->id = ofono_voicecall_get_next_callid(vc);
call->type = type;
call->direction = direction;