qapi: Consistent generated code: prefer common indentation
commite36c714e6aad7c9266132350833e2f263f6d8874
authorEric Blake <eblake@redhat.com>
Tue, 29 Sep 2015 22:21:11 +0000 (29 16:21 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 12 Oct 2015 16:46:49 +0000 (12 18:46 +0200)
tree37cc7e6e67bd6867c30ee0985b264597398f204f
parentf782399cb4fa3fc4182cb046817f65a6db92ab07
qapi: Consistent generated code: prefer common indentation

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.
This is one patch of a series to clean up these differences.

This patch adjusts gen_visit_union() to use the same indentation
as other functions, namely, by jumping early to the error label
if the object was not set rather than placing the rest of the
body inside an if for when it is set.

No change in semantics to the generated code.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1443565276-4535-14-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi-visit.py