On 11/18/2015 11:54 AM, Markus Armbruster wrote:
> Eric Blake <ebl...@redhat.com> writes:
> 
>> None of the visitor callbacks would set an error when testing
>> if an optional field was present; make this part of the interface
>> contract by eliminating the errp argument.
>>
>> The resulting generated code has a nice diff:
>>
>> |-    visit_optional(v, &has_fdset_id, "fdset-id", &err);
>> |-    if (err) {
>> |-        goto out;
>> |-    }
>> |-    if (has_fdset_id) {
>> |+    visit_optional(v, &has_fdset_id, "fdset-id");
>> |+    if (has_fdset_id) {
>> |         visit_type_int(v, &fdset_id, "fdset-id", &err);
>> |         if (err) {
>> |             goto out;
>> |         }
>> |     }
> 
> I think this should be
> 
>   |-    visit_optional(v, &has_fdset_id, "fdset-id", &err);
>   |-    if (err) {
>   |-        goto out;
>   |-    }
>   |+    visit_optional(v, &has_fdset_id, "fdset-id");
>   |     if (has_fdset_id) {

Oh, yeah.  Serves me right for hand-editing a diff in my commit message.
 (Patch applies either diff just fine, it's just that mine was longer
than necessary).

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