qemu-e2k/scripts/qapi
Markus Armbruster 89bf68f933 qapi: Generate simpler marshalling code when no arguments
When command FOO has no arguments, its generated qmp_marshal_FOO() is
a bit confusing.  Make it simpler:

     visit_start_struct(v, NULL, NULL, 0, &err);
     if (err) {
         goto out;
     }
-
-    if (!err) {
-        visit_check_struct(v, &err);
-    }
+    visit_check_struct(v, &err);
     visit_end_struct(v, NULL);
     if (err) {
         goto out;
     }

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200424084338.26803-16-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2020-04-30 07:26:41 +02:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py qapi: Generate simpler marshalling code when no arguments 2020-04-30 07:26:41 +02:00
common.py qapi: Drop conditionals for Python 2 2020-03-05 09:24:11 +01:00
doc.py qapi: Consistently put @features parameter right after @ifcond 2020-03-17 19:58:34 +01:00
error.py qapi: Use super() now we have Python 3 2020-03-05 09:24:11 +01:00
events.py qapi: Add feature flags to remaining definitions 2020-03-17 19:58:34 +01:00
expr.py qapi: Add feature flags to struct members 2020-03-17 21:25:47 +01:00
gen.py qemu-storage-daemon: Add --monitor option 2020-03-06 17:21:28 +01:00
introspect.py qapi: Add feature flags to struct members 2020-03-17 21:25:47 +01:00
parser.py qapi: Brush off some (py)lint 2020-03-05 09:24:11 +01:00
schema.py qapi: New special feature flag "deprecated" 2020-03-17 21:42:47 +01:00
source.py qapi: Inheriting from object is pointless with Python 3, drop 2020-03-05 09:24:11 +01:00
types.py qapi: Consistently put @features parameter right after @ifcond 2020-03-17 19:58:34 +01:00
visit.py qapi: Assert non-input visitors see only valid alternate tags 2020-04-30 07:26:40 +02:00