qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qom: use object_new_with_type in object_new_wit


From: Wei Yang
Subject: Re: [Qemu-devel] [PATCH] qom: use object_new_with_type in object_new_with_propv
Date: Tue, 12 Mar 2019 06:19:53 +0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Mar 11, 2019 at 06:08:10PM +0100, Marc-André Lureau wrote:
>Hi
>
>On Mon, Mar 11, 2019 at 9:34 AM Wei Yang <address@hidden> wrote:
>>
>> Function object_new_with_propv already get the Type of the object, so we
>> could leverage object_new_with_type here.
>>
>> [make check test pass]
>>
>> Signed-off-by: Wei Yang <address@hidden>
>> ---
>>  qom/object.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/qom/object.c b/qom/object.c
>> index 05a8567041..76d2f1eb2f 100644
>> --- a/qom/object.c
>> +++ b/qom/object.c
>> @@ -640,7 +640,7 @@ Object *object_new_with_propv(const char *typename,
>>          error_setg(errp, "object type '%s' is abstract", typename);
>>          return NULL;
>>      }
>> -    obj = object_new(typename);
>> +    obj = object_new_with_type(klass->type);
>>
>>      if (object_set_propv(obj, &local_err, vargs) < 0) {
>>          goto error;
>> --
>> 2.19.1
>>
>>
>
>Reviewed-by: Marc-André Lureau <address@hidden>
>

Thanks :-)

>-- 
>Marc-André Lureau

-- 
Wei Yang
Help you, Help me



reply via email to

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