qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 07/37] qapi: Improve generated event use of q


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v9 07/37] qapi: Improve generated event use of qapi visitor
Date: Tue, 26 Jan 2016 16:40:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 01/20/2016 10:10 AM, Eric Blake wrote:
> Oops. It all gets cleaned up in 33 when visit_end_struct() loses the
> errp argument, but in the meantime, I think the most robust way to write
> this would be:
> 
> out_obj:
>     visit_end_struct(v, err ? NULL : &err);
>     if (err) {
> ...
> 
>>
>> I guess the idea is to go from gen_visit_fields() failure through
>> visit_end_struct() here to out.  Correct?
> 
> Yes.

Technically, visit_end_struct() for QMP output visitor never sets errp,
but it's not nice to have to audit multiple files just to find that out.
 I'll stick to the ternary until patch 33 cleans it back up.

-- 
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]