[Top][All Lists]

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

Re: [Qemu-devel] [PATCH qom-next] qom: make object cast assert if NULL o

From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH qom-next] qom: make object cast assert if NULL object is passed as argument
Date: Thu, 31 May 2012 13:17:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/31/2012 12:16 PM, Paolo Bonzini wrote:
Il 31/05/2012 10:30, Markus Armbruster ha scritto:
Makes much sense, but maybe it should be done in OBJECT() cast? Assert
when we do OBJECT(NULL).
In my opinion, OBJECT(p) where p is a null pointer is perfectly valid
and should yield a null pointer.

Perhaps object_dynamic_cast and object_dynamic_cast_assert should do the

or better object_dynamic_cast should return NULL if obj is NULL,
after all it's expected that it may return NULL



reply via email to

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