diff options
author | Markus Armbruster | 2020-04-24 10:43:38 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-04-30 07:26:41 +0200 |
commit | 89bf68f933393a1bc0de4d07b59ffa8920da130f (patch) | |
tree | 16990310cada8c9e2f6015c37769cf7223a1a01e /linux-user/fd-trans.c | |
parent | qapi: Disallow qmp_marshal_FOO(NULL, ...) (diff) | |
download | qemu-89bf68f933393a1bc0de4d07b59ffa8920da130f.tar.gz qemu-89bf68f933393a1bc0de4d07b59ffa8920da130f.tar.xz qemu-89bf68f933393a1bc0de4d07b59ffa8920da130f.zip |
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>
Diffstat (limited to 'linux-user/fd-trans.c')
0 files changed, 0 insertions, 0 deletions