Skip to content

Commit

Permalink
test-visitor-serialization: Pass &error_abort to qobject_from_json()
Browse files Browse the repository at this point in the history
qmp_deserialize() calls qobject_from_json() ignoring errors.  It
passes the result to qobject_input_visitor_new(), which asserts it's
not null.  Therefore, we can just as well pass &error_abort to
qobject_from_json().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <1488317230-26248-16-git-send-email-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Mar 7, 2017
1 parent aec4b05 commit 02146d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test-visitor-serialization.c
Expand Up @@ -1037,7 +1037,7 @@ static void qmp_deserialize(void **native_out, void *datap,
visit_complete(d->qov, &d->obj);
obj_orig = d->obj;
output_json = qobject_to_json(obj_orig);
obj = qobject_from_json(qstring_get_str(output_json), NULL);
obj = qobject_from_json(qstring_get_str(output_json), &error_abort);

QDECREF(output_json);
d->qiv = qobject_input_visitor_new(obj);
Expand Down

0 comments on commit 02146d2

Please sign in to comment.