Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it.
Signed-off-by: Max Reitz <mre...@redhat.com> --- block/nbd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 8d9a217..145db39 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -415,7 +415,7 @@ static void nbd_refresh_filename(BlockDriverState *bs, QDict *options) port = stringify(NBD_DEFAULT_PORT); } - qdict_put_obj(opts, "driver", QOBJECT(qstring_from_str("nbd"))); + qdict_put(opts, "driver", qstring_from_str("nbd")); if (path && export) { snprintf(bs->exact_filename, sizeof(bs->exact_filename), @@ -432,16 +432,16 @@ static void nbd_refresh_filename(BlockDriverState *bs, QDict *options) } if (path) { - qdict_put_obj(opts, "path", QOBJECT(qstring_from_str(path))); + qdict_put(opts, "path", qstring_from_str(path)); } else { - qdict_put_obj(opts, "host", QOBJECT(qstring_from_str(host))); - qdict_put_obj(opts, "port", QOBJECT(qstring_from_str(port))); + qdict_put(opts, "host", qstring_from_str(host)); + qdict_put(opts, "port", qstring_from_str(port)); } if (export) { - qdict_put_obj(opts, "export", QOBJECT(qstring_from_str(export))); + qdict_put(opts, "export", qstring_from_str(export)); } if (tlscreds) { - qdict_put_obj(opts, "tls-creds", QOBJECT(qstring_from_str(tlscreds))); + qdict_put(opts, "tls-creds", qstring_from_str(tlscreds)); } bs->full_open_options = opts; -- 2.7.1