qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 14/14] block: Don't bother asserting type of out


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 14/14] block: Don't bother asserting type of output visitor's output
Date: Tue, 21 Feb 2017 13:46:45 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 02/17/2017 02:38 PM, Markus Armbruster wrote:
> After a visit of a complex QAPI type FOO
> 
>     ov = qobject_output_visitor_new(&foo);
>     visit_type_FOO(ov, NULL, expr, &error_abort);
>     visit_complete(ov, &foo);
> 
> we can safely assume qobject_type(foo) is QTYPE_QDICT.  We do in many
> places, but occasionally assert qobject_type(obj) == QTYPE_QDICT.
> Don't.  The appropriate place to check such fundamental properties of
> QAPI visitors is the test suite.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  block/nbd.c  | 2 --
>  block/nfs.c  | 2 --
>  block/qapi.c | 1 -
>  3 files changed, 5 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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