@@ -437,7 +437,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),
@@ -454,16 +454,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;
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Signed-off-by: Max Reitz <mreitz@redhat.com> --- block/nbd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)