qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] remove call to type_initialize in object_new_wi


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH] remove call to type_initialize in object_new_with_type
Date: Fri, 14 Jun 2013 23:06:11 +1000

On Fri, Jun 14, 2013 at 5:09 PM, Hu Tao <address@hidden> wrote:
> On Thu, Jun 13, 2013 at 06:51:49PM +0800, Hu Tao wrote:
>> Since it's called in object_initialize_with_type later.
>>
>> Signed-off-by: Hu Tao <address@hidden>
>> ---
>>  qom/object.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/qom/object.c b/qom/object.c
>> index 803b94b..38dc45e 100644
>> --- a/qom/object.c
>> +++ b/qom/object.c
>> @@ -406,9 +406,6 @@ Object *object_new_with_type(Type type)
>>  {
>>      Object *obj;
>>
>> -    g_assert(type != NULL);
>> -    type_initialize(type);
>> -
>>      obj = g_malloc(type->instance_size);
>
> Well, type->instance_size has to be initialized before this.
>

Missed this reply. Thanks for catching. Sorry for the noise.

Regards,
Peter

>>      object_initialize_with_type(obj, type);
>>      obj->free = g_free;
>> --
>> 1.8.2.3
>>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]