qapi: Consolidate QMP input visitor creation

Rather than having two separate ways to create a QMP input
visitor, where the safer approach has the more verbose name,
it is better to consolidate things into a single function
where the caller must explicitly choose whether to be strict
or to ignore excess input.  This patch is the strictly
mechanical conversion; the next patch will then audit which
uses can be made stricter.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1461879932-9020-6-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Eric Blake 2016-04-28 15:45:13 -06:00 committed by Markus Armbruster
parent b471d012e5
commit fc471c18d5
12 changed files with 19 additions and 23 deletions

2
qmp.c
View file

@ -663,7 +663,7 @@ void qmp_object_add(const char *type, const char *id,
}
}
qiv = qmp_input_visitor_new(props);
qiv = qmp_input_visitor_new(props, false);
obj = user_creatable_add_type(type, id, pdict,
qmp_input_get_visitor(qiv), errp);
qmp_input_visitor_cleanup(qiv);