aboutsummaryrefslogtreecommitdiff
path: root/block/nfs.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-17 21:38:25 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-02-22 19:52:20 +0100
commit7c81e4e9db5f63635fbf11d66bf08e73d325ae97 (patch)
tree0124c3507715bb5dc41decd80432d3f158a58a10 /block/nfs.c
parentbbf1028a0ade883cebae5faf984f0e78cb794b17 (diff)
block: Don't bother asserting type of output visitor's output
After a visit of a complex QAPI type FOO ov = qobject_output_visitor_new(&foo); visit_type_FOO(ov, NULL, expr, &error_abort); visit_complete(ov, &foo); we can safely assume qobject_type(foo) is QTYPE_QDICT. We do in many places, but occasionally assert qobject_type(obj) == QTYPE_QDICT. Don't. The appropriate place to check such fundamental properties of QAPI visitors is the test suite. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1487363905-9480-15-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/nfs.c')
-rw-r--r--block/nfs.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/block/nfs.c b/block/nfs.c
index 08b43dd189..0cf115e7d6 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -805,8 +805,6 @@ static void nfs_refresh_filename(BlockDriverState *bs, QDict *options)
ov = qobject_output_visitor_new(&server_qdict);
visit_type_NFSServer(ov, NULL, &client->server, &error_abort);
visit_complete(ov, &server_qdict);
- assert(qobject_type(server_qdict) == QTYPE_QDICT);
-
qdict_put_obj(opts, "server", server_qdict);
qdict_put(opts, "path", qstring_from_str(client->path));