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