Eric Blake <ebl...@redhat.com> writes: > We had some pointless differences in the generated code for visit, > command marshalling, and events; unifying them makes it easier for > future patches to consolidate to common helper functions. > - Consistently name the error variable 'err'
Before the patch, qapi-event.py consistently uses local_err, and qapi-commands.py uses both names. I like your change. > - Consistently use the labels 'out' and 'out_obj' Before, qapi-event.py consistently uses 'clean', and qapi-visit.py uses both 'out_obj' and 'out_end'. Good change. > - If allocation fails, jump to the right label rather than > indenting everything else Good idea. Just one instance, in gen_visit_union(). Not mentioned: name the Visitor * parameter 'v' instead of 'm'. No idea where that 'm' comes from, but it has spilled over into qom/object.c and qom/qom-object.c. Let's ignore that for now. > No change in semantics to the generated code. Yes, but you need to update docs/qapi-code-gen.txt. Pretty mechanical changes. They look good to me, but as always, this kind is easier to review when you do exactly one mechanical change per patch.