On 04/28/2016 07:00 AM, Eric Blake wrote: >> The commit message lists start_struct(), start_alternate(), next_list(), >> type_str(), and type_any(). You cover them except for next_list(). Why >> is that missing? > > Because *obj can be NULL after next_list() if the list is empty. But > there may still be a weaker assertion worth having: if err, then *obj > must be NULL; and if *obj, then err must not be set (weaker in that for > all the other functions touched, exactly one of the two conditions can > result, but here, !err and !*obj is valid as a third condition).
Actually, because visit_next_list() can't fail (we removed the errp argument earlier). When we finally move the list head allocation into visit_start_list later in the series (22/23), then we should add the (weaker) assert there. > > Depending on what else you find later in the series, I may just post a > fixup for this patch. Still my plan. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
